[gst-cvs] gst-plugins-good: matroskademux: Ignore keyframe flag for non-video streams

Sebastian Dröge slomo at kemper.freedesktop.org
Sun Jun 6 05:59:44 PDT 2010


Module: gst-plugins-good
Branch: master
Commit: b2ff8042d36077ce01e82e28efaf4e6f5d21391b
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=b2ff8042d36077ce01e82e28efaf4e6f5d21391b

Author: Philip Jägenstedt <philipj at opera.com>
Date:   Sun Jun  6 14:03:53 2010 +0200

matroskademux: Ignore keyframe flag for non-video streams

When the keyframe bit of SimpleBlock Flags wasn't set, the buffer was being
marked with GST_BUFFER_FLAG_DELTA_UNIT, causing all buffers to be skipped
after a seek. This may be a problem with the Sorenson Squish encoder, but
arguably the keyframe bit should only be applied to video.

Fixes bug #620358.

---

 gst/matroska/matroska-demux.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 63f4e76..8ba9ea1 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -4815,7 +4815,9 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
       gst_matroska_demux_sync_streams (demux);
 
       if (is_simpleblock) {
-        if (flags & 0x80)
+        /* bit 0 of SimpleBlock Flags is "Keyframe, set when the Block
+           contains only keyframes" */
+        if (flags & 0x80 || stream->type != GST_MATROSKA_TRACK_TYPE_VIDEO)
           GST_BUFFER_FLAG_UNSET (sub, GST_BUFFER_FLAG_DELTA_UNIT);
         else
           GST_BUFFER_FLAG_SET (sub, GST_BUFFER_FLAG_DELTA_UNIT);





More information about the Gstreamer-commits mailing list