Skip to content
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

Change ATTRIBUTE_PATTERN in SessionDescriptionParser #9430

Closed
nibblis opened this issue Sep 15, 2021 · 1 comment
Closed

Change ATTRIBUTE_PATTERN in SessionDescriptionParser #9430

nibblis opened this issue Sep 15, 2021 · 1 comment
Assignees
Labels

Comments

@nibblis
Copy link

nibblis commented Sep 15, 2021

Can you change SessionDescriptionParser?

I would like to change:
ATTRIBUTE_PATTERN = Pattern.compile("([0-9A-Za-z-]+)(?::(.*))?");
to
ATTRIBUTE_PATTERN = Pattern.compile("([0-9A-Za-z-_]+)(?::(.*))?");
add _

The problem is that my camera's response contains the line a=Media_header:MEDIAINFO=494D4B48010100000400010000000000000000000000000000000000000000000000000000000000; and an exception is thrown:

Caused by: com.google.android.exoplayer2.ParserException: Malformed Attribute line: a=Media_header:MEDIAINFO=494D4B48010100000400010000000000000000000000000000000000000000000000000000000000;
at com.google.android.exoplayer2.source.rtsp.SessionDescriptionParser.parse(SessionDescriptionParser.java:159)
at com.google.android.exoplayer2.source.rtsp.RtspClient$MessageListener.handleRtspMessage(RtspClient.java:476)

@claincly
Copy link
Contributor

Support for special characters is added in RFC4566, while we implemented RFC2327.

There will be a patch soon.

kim-vde pushed a commit that referenced this issue Sep 17, 2021
Issue: #9430

The current supported SDP (RFC2327) spec only allows for alpha-numeric
characters in the attribute-field. RFC4566 (section 9, token type) allowed
extra characters, and this CL adds the support.

PiperOrigin-RevId: 397301173
@claincly claincly closed this as completed Feb 6, 2022
@google google locked and limited conversation to collaborators Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants