rtspsrc: segfaults when is-live=false
Describe your issue
I am attempting to replay RTSP streams from a Hanwha NVR that implements some Onvif extensions for playback, particularly the onvif-rate-control header, allowing the client to control the data flow. I am trying to set the 'is-live' property to false on the rtspsrc element in combination with the onvif-mode and onvif-rate-control properties, aiming to utilize the instant rate control changes and frame stepping features. These features seem to not function properly when 'is-live' is left as true.
Expected Behavior
I anticipated that with 'is-live' set to false, the rtspsrc would continue to operate as usual, allowing data reading at varying rates based on the rates set with seek commands and the instantaneous rate change flags.
Observed Behavior
The program crashes with an access violation due to a null pointer.
Setup
- Operating System: Windows 10 Enterprise
- Device: Computer
- GStreamer Version: 1.22.4
- Command line: gst-launch-1.0 rtspsrc location=<rtsp_url> is-live=false ! fakesink
Steps to reproduce the bug
To reproduce the crash, run the following pipeline using gst-launch:
gst-launch-1.0 rtspsrc location=<rtsp_url> is-live=false ! fakesink
How reproducible is the bug?
The issue consistently occurs when 'is-live' is set to false on rtspsrc and can be reproduced using devtools (i.e., gst-launch).
Screenshots if relevant
Solutions you have tried
I have attempted different combinations of 'is-live', 'onvif-mode', and 'onvif-rate-control' to determine whether the issue is limited to a single combination of properties. As I am relatively new to GStreamer, I have not attempted to fix the source code yet. I am not sufficiently familiar with the internals of rtspsrc (like the ghost pads etc.) to start making adjustments.
I also tried a bunch of different RTSP servers to see if the format of the video had anything to do with it but no luck there either.
Related non-duplicate issues
Additional Information
Debugging the crash using the provided pdbs it seems the 'self' argument in gst_rtspsrc_update_src_event
may be null, if that's of any help, on line 3129 crashes trying to access the conninfo field.