Replies: 1 comment
-
moved here #82 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use a camera that is providing an invalid timing element in the SDP header. Instead of providing 2 timestamps (start and stop) is it sending:
t=now-
It is unlikely the camera will be updated/fixed as it is very old. I have not had issues when using ffmpeg to stream from it as it seems to ignore the improper syntax. I would like to use rtsp-simple-server with this camera and am looking for suggestions for a proper/acceptable approach to fix or workaround this issue.
I have identified where the fix needs to happen: https://github.com/aler9/gortsplib/blob/c056fd4fa3d4e2085aac59667b2dd51ec466ccea/pkg/sdp/sdp.go#L297
I could look for this specific case with an else len(field) = 1 and fields[0]='now-' in which case I would return a TimeDescription with StartTime and StopTime set to 0.
Alternatively I could change the error handling when calling unmarshalTiming here: https://github.com/aler9/gortsplib/blob/c056fd4fa3d4e2085aac59667b2dd51ec466ccea/pkg/sdp/sdp.go#L604 to log the syntax error, ignore it and append a TimeDescription with StartTime and StopTime set to 0 to the SessionDescription.
Thoughts? Any other suggestions? Would there be interest in a pull request for this change? I could just keep it local too.
Beta Was this translation helpful? Give feedback.
All reactions