summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-12-17 12:06:43 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-12-17 12:06:43 +0000
commitb050e06170949a84e9427706e8dbb6b45d2692a4 (patch)
tree4d7ee7beeabc4190056241744a48edb1dfda990d /gst
parent1ea02b7a383f461d948eaeba82adb248e01e9127 (diff)
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.
Diffstat (limited to 'gst')
-rw-r--r--gst/mxf/mxfdemux.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index 4b1a3ba15..17ec3a184 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))