flvdemux: Audio tags without any content are valid.
authorEdward Hervey <bilboed@bilboed.com>
Sat, 13 Feb 2010 17:18:42 +0000 (18:18 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Sat, 13 Feb 2010 17:18:42 +0000 (18:18 +0100)
We silently ignore them instead of erroring out.

gst/flv/gstflvparse.c

index 1ee1752..55fd87a 100644 (file)
@@ -579,11 +579,17 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, GstBuffer * buffer)
   /* Combine them */
   pts |= pts_ext << 24;
 
-  if (GST_BUFFER_SIZE (buffer) < 12) {
-    GST_ERROR_OBJECT (demux, "Too small tag size");
+  /* Error out on tags with too small headers */
+  if (GST_BUFFER_SIZE (buffer) < 11) {
+    GST_ERROR_OBJECT (demux, "Too small tag size (%d)",
+        GST_BUFFER_SIZE (buffer));
     return GST_FLOW_ERROR;
   }
 
+  /* Silently skip buffers with no data */
+  if (GST_BUFFER_SIZE (buffer) == 11)
+    return GST_FLOW_OK;
+
   /* Skip the stream id and go directly to the flags */
   flags = GST_READ_UINT8 (data + 7);