avidemux: streaming; adjust sizes to cater for padding in chunks
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 18 Jun 2009 14:58:26 +0000 (16:58 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 18 Jun 2009 14:59:26 +0000 (16:59 +0200)
gst/avi/gstavidemux.c

index 6ab073f33ed3f5bc9af5e0a69d28d91fca82249f..a5b76d2080f1a8b5b38428f36e1d54d739e4c177 100644 (file)
@@ -4019,7 +4019,7 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
       if (gst_avi_demux_peek_chunk (avi, &tag, &size)) {
         if ((size > 0) && (size != -1)) {
           GST_DEBUG ("  skipping %d bytes for now", size);
-          gst_adapter_flush (avi->adapter, 8 + size);
+          gst_adapter_flush (avi->adapter, 8 + GST_ROUND_UP_2 (size));
         }
       }
       return GST_FLOW_OK;
@@ -4043,7 +4043,7 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
       if (gst_avi_demux_peek_chunk (avi, &tag, &size)) {
         if ((size > 0) && (size != -1)) {
           GST_DEBUG ("  skipping %d bytes for now", size);
-          gst_adapter_flush (avi->adapter, 8 + size);
+          gst_adapter_flush (avi->adapter, 8 + GST_ROUND_UP_2 (size));
           continue;
         }
       }