gst/matroska/matroska-demux.c: Allow zero sized blocks instead of returning GST_FLOW_...
authorSebastian Dröge <slomo@circular-chaos.org>
Thu, 21 Aug 2008 12:34:33 +0000 (12:34 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Thu, 21 Aug 2008 12:34:33 +0000 (12:34 +0000)
Original commit message from CVS:
* gst/matroska/matroska-demux.c:
(gst_matroska_demux_parse_blockgroup_or_simpleblock):
Allow zero sized blocks instead of returning GST_FLOW_OK. Such blocks
are used for text/plain subtitles as a gap-filler in some files.

ChangeLog
gst/matroska/matroska-demux.c

index 6858b6054004fe307237ff16570606fd4e617440..4c3d32f123b3453ad474e802cee39ee533622efb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-21  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
+
+       * gst/matroska/matroska-demux.c:
+       (gst_matroska_demux_parse_blockgroup_or_simpleblock):
+       Allow zero sized blocks instead of returning GST_FLOW_OK. Such blocks
+       are used for text/plain subtitles as a gap-filler in some files.
+
 2008-08-21  Wim Taymans  <wim.taymans@collabora.co.uk>
 
        * sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_structure),
index 42ef27032699977dd39e3e4c7ca97fa817958986..0179b4edf62838af5eef2656f7b4411f8a54aa68 100644 (file)
@@ -3904,7 +3904,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
 
         /* fetch stream from num */
         stream_num = gst_matroska_demux_stream_from_num (demux, num);
-        if (size <= 3 || stream_num < 0 || stream_num >= demux->num_streams) {
+        if (size < 3 || stream_num < 0 || stream_num >= demux->num_streams) {
           gst_buffer_unref (buf);
           buf = NULL;
           GST_WARNING_OBJECT (demux, "Invalid stream %d or size %u", stream_num,
@@ -4135,9 +4135,6 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
       GstBuffer *sub;
       GstClockTimeDiff diff;
 
-      if (lace_size[n] == 0)
-        continue;
-
       sub = gst_buffer_create_sub (buf,
           GST_BUFFER_SIZE (buf) - size, lace_size[n]);