-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stream_info.closed_captions returns "cc" instead of cc #122
Comments
Here's a reproduction for this. I suspect the ultimate culprit is that the parser appears to only deal with strings, so it has no real notion of types (e.g. quoted-string, enumerated-string). import pytest
import m3u8
SIMPLE_STREAM_INF = """#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=768647,CODECS="avc1.4d001f,mp4a.40.2",RESOLUTION=480x270,CLOSED-CAPTIONS="cc",SUBTITLES="sub",AUDIO="aud"
http://10.129.6.151:8080/dump/video_4/video_4.m3u8
"""
@pytest.fixture
def stream_inf():
stream_inf_tags = m3u8.loads(SIMPLE_STREAM_INF).playlists
assert len(stream_inf_tags) == 1
return stream_inf_tags[0]
def test_codecs_not_quoted(stream_inf):
assert stream_inf.stream_info.codecs == 'avc1.4d001f,mp4a.40.2'
def test_closed_captions_not_quoted(stream_inf):
assert stream_inf.stream_info.closed_captions == 'cc' The codecs aren't quoted, but the closed captions id is:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
stream_info.closed_captions returns "cc" instead of cc without quotation marks
The text was updated successfully, but these errors were encountered: