mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-13 09:45:27 +00:00
avidemux: more DISCONT handling
Add some debug in the DISCONT handling code. When we receive a DISCONT in push mode, mark all streams as DISCONT.
This commit is contained in:
parent
40e3b0189a
commit
570319822a
1 changed files with 11 additions and 0 deletions
|
@ -3815,6 +3815,7 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
/* reset the last flow and mark discont, FLUSH is always DISCONT */
|
/* reset the last flow and mark discont, FLUSH is always DISCONT */
|
||||||
for (i = 0; i < avi->num_streams; i++) {
|
for (i = 0; i < avi->num_streams; i++) {
|
||||||
|
GST_DEBUG_OBJECT (avi, "marking DISCONT");
|
||||||
avi->stream[i].last_flow = GST_FLOW_OK;
|
avi->stream[i].last_flow = GST_FLOW_OK;
|
||||||
avi->stream[i].discont = TRUE;
|
avi->stream[i].discont = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -4308,6 +4309,7 @@ gst_avi_demux_loop_data (GstAviDemux * avi)
|
||||||
|
|
||||||
/* mark discont when pending */
|
/* mark discont when pending */
|
||||||
if (stream->discont) {
|
if (stream->discont) {
|
||||||
|
GST_DEBUG_OBJECT (avi, "setting DISCONT flag");
|
||||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
|
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
|
||||||
stream->discont = FALSE;
|
stream->discont = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -4722,6 +4724,15 @@ gst_avi_demux_chain (GstPad * pad, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstAviDemux *avi = GST_AVI_DEMUX (GST_PAD_PARENT (pad));
|
GstAviDemux *avi = GST_AVI_DEMUX (GST_PAD_PARENT (pad));
|
||||||
|
gint i;
|
||||||
|
|
||||||
|
if (GST_BUFFER_IS_DISCONT (buf)) {
|
||||||
|
GST_DEBUG_OBJECT (avi, "got DISCONT");
|
||||||
|
gst_adapter_clear (avi->adapter);
|
||||||
|
/* mark all streams DISCONT */
|
||||||
|
for (i = 0; i < avi->num_streams; i++)
|
||||||
|
avi->stream[i].discont = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
GST_DEBUG ("Store %d bytes in adapter", GST_BUFFER_SIZE (buf));
|
GST_DEBUG ("Store %d bytes in adapter", GST_BUFFER_SIZE (buf));
|
||||||
gst_adapter_push (avi->adapter, buf);
|
gst_adapter_push (avi->adapter, buf);
|
||||||
|
|
Loading…
Reference in a new issue