GNOME Bugzilla – Bug 781319
qtdemux: Reset adapter in more discontinuity cases
Last modified: 2017-04-18 09:54:57 UTC
See commit
Created attachment 349870 [details] [review] qtdemux: Reset adapter in more discontinuity cases In push mode we process as much as possible in the adapter. When we receive a DISCONT buffer which we can't match to an actual sample (based on the existing sample table) and there is still data remaining in the incoming adapter,there is one of two cases happening: 1) We are doing reverse playback, in which case we should flush out all pending data 2) We have leftover data from the previous incoming buffer... which we can't do anything about. For the second case, make sure we flush out the remaining data so that we can start parsing again from scratch.
Review of attachment 349870 [details] [review]: ::: gst/isomp4/qtdemux.c @@ +6332,3 @@ demux->offset = GST_BUFFER_OFFSET (inbuf); + if (!demux->fragmented || demux->segment.rate > 0) + gst_adapter_clear (demux->adapter); Shouldn't we clear the adapter here in any case?
Created attachment 349872 [details] [review] qtdemux: Reset adapter in more discontinuity cases In push mode we process as much as possible in the adapter. When we receive a DISCONT buffer which we can't match to an actual sample (based on the existing sample table) and there is still data remaining in the incoming adapter,there is one of two cases happening: 1) We are doing reverse playback, in which case we should flush out all pending data 2) We have leftover data from the previous incoming buffer... which we can't do anything about. For the second case, make sure we flush out the remaining data so that we can start parsing again from scratch.
Review of attachment 349872 [details] [review]: Looks good to me
commit 58e3033747b0e96d7d4d120141707525587dbdd2 Author: Edward Hervey <edward@centricular.com> Date: Fri Apr 14 17:01:49 2017 +0200 qtdemux: Reset adapter in more discontinuity cases In push mode we process as much as possible in the adapter. When we receive a DISCONT buffer which we can't match to an actual sample (based on the existing sample table) and there is still data remaining in the incoming adapter,there is one of two cases happening: 1) We are doing reverse playback, in which case we should flush out all pending data 2) We have leftover data from the previous incoming buffer... which we can't do anything about. For the second case, make sure we flush out the remaining data so that we can start parsing again from scratch. https://bugzilla.gnome.org/show_bug.cgi?id=781319