mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
gst/avi/gstavimux.*: Ensure header size invariance during subsequent rewrite by using tags snapshot.
Original commit message from CVS: * gst/avi/gstavimux.c: (gst_avi_mux_reset), (gst_avi_mux_riff_get_avi_header): * gst/avi/gstavimux.h: Ensure header size invariance during subsequent rewrite by using tags snapshot.
This commit is contained in:
parent
67cc69ad52
commit
b506ab9918
3 changed files with 25 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2009-01-06 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/avi/gstavimux.c: (gst_avi_mux_reset),
|
||||||
|
(gst_avi_mux_riff_get_avi_header):
|
||||||
|
* gst/avi/gstavimux.h:
|
||||||
|
Ensure header size invariance during subsequent rewrite by using
|
||||||
|
tags snapshot.
|
||||||
|
|
||||||
2009-01-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2009-01-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
* ext/pulse/pulsesink.c: (gst_pulsesink_destroy_stream):
|
* ext/pulse/pulsesink.c: (gst_pulsesink_destroy_stream):
|
||||||
|
|
|
@ -383,6 +383,11 @@ gst_avi_mux_reset (GstAviMux * avimux)
|
||||||
avimux->avi_hdr.max_bps = 10000000;
|
avimux->avi_hdr.max_bps = 10000000;
|
||||||
avimux->codec_data_size = 0;
|
avimux->codec_data_size = 0;
|
||||||
|
|
||||||
|
if (avimux->tags_snap) {
|
||||||
|
gst_tag_list_free (avimux->tags_snap);
|
||||||
|
avimux->tags_snap = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
g_free (avimux->idx);
|
g_free (avimux->idx);
|
||||||
avimux->idx = NULL;
|
avimux->idx = NULL;
|
||||||
|
|
||||||
|
@ -965,7 +970,15 @@ gst_avi_mux_riff_get_avi_header (GstAviMux * avimux)
|
||||||
GST_DEBUG_OBJECT (avimux, "creating avi header, data_size %u, idx_size %u",
|
GST_DEBUG_OBJECT (avimux, "creating avi header, data_size %u, idx_size %u",
|
||||||
avimux->data_size, avimux->idx_size);
|
avimux->data_size, avimux->idx_size);
|
||||||
|
|
||||||
tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (avimux));
|
if (avimux->tags_snap)
|
||||||
|
tags = avimux->tags_snap;
|
||||||
|
else {
|
||||||
|
/* need to make snapshot of current state of tags to ensure the same set
|
||||||
|
* is used next time around during header rewrite at the end */
|
||||||
|
tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (avimux));
|
||||||
|
if (tags)
|
||||||
|
tags = avimux->tags_snap = gst_tag_list_copy (tags);
|
||||||
|
}
|
||||||
if (tags) {
|
if (tags) {
|
||||||
/* that should be the strlen of all tags + header sizes
|
/* that should be the strlen of all tags + header sizes
|
||||||
* not all of tags end up in a avi, still this is a good estimate
|
* not all of tags end up in a avi, still this is a good estimate
|
||||||
|
|
|
@ -148,6 +148,9 @@ struct _GstAviMux {
|
||||||
gboolean write_header;
|
gboolean write_header;
|
||||||
gboolean restart;
|
gboolean restart;
|
||||||
|
|
||||||
|
/* tags */
|
||||||
|
GstTagList *tags_snap;
|
||||||
|
|
||||||
/* information about the AVI index ('idx') */
|
/* information about the AVI index ('idx') */
|
||||||
gst_riff_index_entry *idx;
|
gst_riff_index_entry *idx;
|
||||||
gint idx_index, idx_count;
|
gint idx_index, idx_count;
|
||||||
|
|
Loading…
Reference in a new issue