mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
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.
This commit is contained in:
parent
fb682d0444
commit
feed8c2af3
1 changed files with 10 additions and 2 deletions
|
@ -1399,9 +1399,17 @@ gst_avi_mux_riff_get_avi_header (GstAviMux * avimux)
|
||||||
GST_BUFFER_SIZE (buffer) += 12;
|
GST_BUFFER_SIZE (buffer) += 12;
|
||||||
buffdata = GST_BUFFER_DATA (buffer) + highmark;
|
buffdata = GST_BUFFER_DATA (buffer) + highmark;
|
||||||
|
|
||||||
|
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 */
|
/* update list size */
|
||||||
GST_WRITE_UINT32_LE (ptr, highmark - startsize - 4);
|
GST_WRITE_UINT32_LE (ptr, highmark - startsize - 4);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* avi data header */
|
/* avi data header */
|
||||||
memcpy (buffdata + 0, "LIST", 4);
|
memcpy (buffdata + 0, "LIST", 4);
|
||||||
|
|
Loading…
Reference in a new issue