From b050e06170949a84e9427706e8dbb6b45d2692a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 17 Dec 2008 12:06:43 +0000 Subject: gst/mxf/mxfdemux.c: In push mode skip the run in again if we get buffers with an offset before the run in. This can h... Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_chain): In push mode skip the run in again if we get buffers with an offset before the run in. This can happen on seeks for example. --- ChangeLog | 6 ++++++ gst/mxf/mxfdemux.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe710888..b5d0a3dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-17 Sebastian Dröge + + * gst/mxf/mxfdemux.c: (gst_mxf_demux_chain): + In push mode skip the run in again if we get buffers with + an offset before the run in. This can happen on seeks for example. + 2008-12-16 Stefan Kost * ext/celt/gstceltenc.c: diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 4b1a3ba1..17ec3a18 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -554,11 +554,11 @@ gst_mxf_demux_choose_package (GstMXFDemux * demux) for (i = 0; i < demux->preface->content_storage->n_packages; i++) { if (demux->preface->content_storage->packages[i] && - MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface-> - content_storage->packages[i])) { + MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->content_storage-> + packages[i])) { ret = - MXF_METADATA_GENERIC_PACKAGE (demux->preface-> - content_storage->packages[i]); + MXF_METADATA_GENERIC_PACKAGE (demux->preface->content_storage-> + packages[i]); break; } } @@ -1666,6 +1666,11 @@ gst_mxf_demux_chain (GstPad * pad, GstBuffer * inbuf) } gst_adapter_flush (demux->adapter, 1); } + } else if (demux->offset < demux->run_in) { + gst_adapter_flush (demux->adapter, + MIN (gst_adapter_available (demux->adapter), + demux->run_in - demux->offset)); + continue; } if (G_UNLIKELY (ret != GST_FLOW_OK)) -- cgit v1.2.1