GNOME Bugzilla – Bug 749684
dashdemux: Segfault when playback starts after refactor for segments iteration
Last modified: 2015-05-25 18:48:23 UTC
Created attachment 303761 [details] [review] Fix segfault on live stream playback Experiencing a segfaults in gstreamer when trying to playback the DASH stream at: http://dash.bidi.int.bbc.co.uk/e/pseudolive/bbb/client_manifest.mpd The functions causing segfaults appear to be: gst_mpd_client_get_next_fragment_timestamp gst_mpd_client_get_next_fragment gst_mpd_client_has_next_segment gst_mpd_client_advance_segment This appears to be cases in the code where stream->segments->len is used without stream->segments being checked first. In other cases where this attribute is used there is a separate case for when the segments attribute is NULL. This behaviour looks like it was introduced in commits 6344f86e "dashdemux: improve mpd parsing for repeated segment entries" and 2105a310 "dashdemux: refactor segment iteration for better performance" The attached patch tries to perform similar operations as other parts introduced in the above commits to fix the functions causing the segfaults.
Adn it seems 100% reproducable, hence ranking up a bit this bug.
Thanks for the patch, merged. ommit c4ff5359aa3642f13d7a67dd938cff1d93dc0f18 Author: David Waring <david.waring@rd.bbc.co.uk> Date: Wed May 20 12:08:38 2015 +0100 dashdemux: Fix segfault introduced by segment iteration refactoring (2105a310). The functions to get the next fragment, next fragment timestamp and to advance to the next fragment need to work differently when stream->segments is NULL. Use logic similar to that introduced by commit 2105a310 to perform these functions. https://bugzilla.gnome.org/show_bug.cgi?id=749684