mnauw gst-plugins-good: gst-plugins-good/ gst-plugins-good/gst/avi/

[email protected] Tue, 6 Jan 2009 06:50:43 -0800 (PST)
Newsgroups gmane.comp.video.gstreamer.cvs
Message-ID <[email protected]>
--===============0789347047533026954==

CVS Root:       /cvs/gstreamer
Module:         gst-plugins-good
Changes by:     mnauw
Date:           Tue Jan 06 2009  14:50:43 UTC

Log message:
* 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.

Modified files:
    .               : ChangeLog
    gst/avi         : gstavimux.c gstavimux.h

Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3883&r2=1.3884
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/avi/gstavimux.c.diff?r1=1.114&r2=1.115
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/avi/gstavimux.h.diff?r1=1.20&r2=1.21

====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v
retrieving revision 1.3883
retrieving revision 1.3884
diff -u -d -r1.3883 -r1.3884
--- ChangeLog	5 Jan 2009 17:31:12 -0000	1.3883
+++ ChangeLog	6 Jan 2009 14:50:26 -0000	1.3884
@@ -1,3 +1,11 @@
+2009-01-06  Mark Nauwelaerts  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* ext/pulse/pulsesink.c: (gst_pulsesink_destroy_stream):
Index: gstavimux.c
RCS file: /cvs/gstreamer/gst-plugins-good/gst/avi/gstavimux.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- gstavimux.c	19 Dec 2008 09:36:45 -0000	1.114
+++ gstavimux.c	6 Jan 2009 14:50:28 -0000	1.115
@@ -383,6 +383,11 @@
   avimux->avi_hdr.max_bps = 10000000;
   avimux->codec_data_size = 0;
+  if (avimux->tags_snap) {
+    gst_tag_list_free (avimux->tags_snap);
+    avimux->tags_snap = NULL;
+  }
   g_free (avimux->idx);
   avimux->idx = NULL;
@@ -965,7 +970,15 @@
   GST_DEBUG_OBJECT (avimux, "creating avi header, data_size %u, idx_size %u",
       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) {
     /* 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
Index: gstavimux.h
RCS file: /cvs/gstreamer/gst-plugins-good/gst/avi/gstavimux.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- gstavimux.h	16 Dec 2008 11:57:01 -0000	1.20
+++ gstavimux.h	6 Jan 2009 14:50:29 -0000	1.21
@@ -148,6 +148,9 @@
   gboolean write_header;
   gboolean restart;
+  /* tags */
+  GstTagList *tags_snap;
   /* information about the AVI index ('idx') */
   gst_riff_index_entry *idx;
   gint idx_index, idx_count;


--===============0789347047533026954==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------

--===============0789347047533026954==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gstreamer-cvs-verbose mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs-verbose

--===============0789347047533026954==--