summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2009-11-05 12:13:44 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2009-11-05 12:31:56 -0300
commitfeed8c2af3d1b00e53a09fb51de9b0b22e012fdf (patch)
treeced34a24b4b7bdfb50d17c7a7fe59f4687d725ab
parentfb682d04448624d919839da7989e8ce0575730a0 (diff)
avimux: do not write empty INFO list
avoid writing an empty INFO list chunk, both because it is useless and because vlc refuses to play the resulting file.
-rw-r--r--gst/avi/gstavimux.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index 584f0e782..ac1e814f0 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -1399,8 +1399,16 @@ gst_avi_mux_riff_get_avi_header (GstAviMux * avimux)
GST_BUFFER_SIZE (buffer) += 12;
buffdata = GST_BUFFER_DATA (buffer) + highmark;
- /* update list size */
- GST_WRITE_UINT32_LE (ptr, highmark - startsize - 4);
+ if (highmark - startsize - 4 == 4) {
+ /* no tags writen, remove the empty INFO LIST as it is useless
+ * and prevents playback in vlc */
+ highmark -= 12;
+ buffdata = GST_BUFFER_DATA (buffer) + highmark;
+ /* no need to erase the writen data, it will be overwriten anyway */
+ } else {
+ /* update list size */
+ GST_WRITE_UINT32_LE (ptr, highmark - startsize - 4);
+ }
}
/* avi data header */