GNOME Bugzilla – Bug 751539
dashdemux: wrong duration validation in gst_mpd_client_get_next_fragment_duration
Last modified: 2015-08-16 13:41:39 UTC
Before returning the duration value, the gst_mpd_client_get_next_fragment_duration function tries to validate it. The condition is: if (GST_CLOCK_TIME_IS_VALID (duration) || segments_count == 0 || seg_idx < segments_count) return duration; return 0; But it should be: if (GST_CLOCK_TIME_IS_VALID (duration) && (segments_count == 0 || seg_idx < segments_count)) return duration; return 0; Even better, we could write the code similar to gst_mpd_client_get_next_fragment or gst_mpd_client_get_next_fragment_timestamp functions: if (!GST_CLOCK_TIME_IS_VALID (duration) || (segments_count > 0 && stream->segment_index >= segments_count)) { return 0; } return duration;
Created attachment 306169 [details] [review] proposed patch
commit e09cf2f3b6106d3aa9e7b8b6ab72b09cce3d45c5 Author: Florin Apostol <florin.apostol@oregan.net> Date: Fri Jun 26 13:09:54 2015 +0100 dashdemux: corrected next fragment duration validation Before returning the next fragment duration value, the gst_mpd_client_get_next_fragment_duration function tries to validate it. But the condition was incorrect. https://bugzilla.gnome.org/show_bug.cgi?id=751539