matroskademux: Ignore keyframe flag for non-video streams
authorPhilip Jägenstedt <philipj@opera.com>
Sun, 6 Jun 2010 12:03:53 +0000 (14:03 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 6 Jun 2010 12:59:29 +0000 (14:59 +0200)
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

index 63f4e76..8ba9ea1 100644 (file)
@@ -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);