typefind: Only advance offset by the number of bytes we actually read
authorSebastian Dröge <slomo@circular-chaos.org>
Mon, 29 Jul 2013 09:05:09 +0000 (11:05 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Mon, 29 Jul 2013 09:05:09 +0000 (11:05 +0200)
There might be a short read at EOS.

plugins/elements/gsttypefindelement.c

index ba1bd57..c298414 100644 (file)
@@ -1088,7 +1088,7 @@ gst_type_find_element_loop (GstPad * pad)
     if (ret != GST_FLOW_OK)
       goto pause;
 
-    typefind->offset += 4096;
+    typefind->offset += gst_buffer_get_size (outbuf);
 
     ret = gst_pad_push (typefind->src, outbuf);
     if (ret != GST_FLOW_OK)