summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Smith <msmith@xiph.org>2008-08-29 00:27:28 +0000
committerMichael Smith <msmith@xiph.org>2008-08-29 00:27:28 +0000
commit7d4c7bf635020ce6d13e6a9ae850e66df9aae074 (patch)
tree90978b8541095d31538f09c3b4c529d75142b35a
parent35168b4a41c275a85ce68ecbeb0469fc387b8491 (diff)
downloadgst-libav-7d4c7bf635020ce6d13e6a9ae850e66df9aae074.tar.gz
ext/ffmpeg/gstffmpegdemux.c: gst_pad_template_new() takes ownership of caps; ref them beforehand since we want to kee...
Original commit message from CVS: * ext/ffmpeg/gstffmpegdemux.c: gst_pad_template_new() takes ownership of caps; ref them beforehand since we want to keep using them afterwards.
-rw-r--r--ChangeLog6
-rw-r--r--ext/ffmpeg/gstffmpegdemux.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 454c392..d178a82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-28 Michael Smith <msmith@songbirdnest.com>
+
+ * ext/ffmpeg/gstffmpegdemux.c:
+ gst_pad_template_new() takes ownership of caps; ref them beforehand
+ since we want to keep using them afterwards.
+
2008-08-28 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new):
diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c
index fa42c3a..6c8b8af 100644
--- a/ext/ffmpeg/gstffmpegdemux.c
+++ b/ext/ffmpeg/gstffmpegdemux.c
@@ -188,6 +188,7 @@ gst_ffmpegdemux_base_init (GstFFMpegDemuxClass * klass)
g_free (details.description);
/* pad templates */
+ gst_caps_ref (params->sinkcaps);
sinktempl = gst_pad_template_new ("sink",
GST_PAD_SINK, GST_PAD_ALWAYS, params->sinkcaps);
videosrctempl = gst_pad_template_new ("video_%02d",
@@ -195,6 +196,9 @@ gst_ffmpegdemux_base_init (GstFFMpegDemuxClass * klass)
audiosrctempl = gst_pad_template_new ("audio_%02d",
GST_PAD_SRC, GST_PAD_SOMETIMES, params->audiosrccaps);
+ params->videosrccaps = NULL;
+ params->audiosrccaps = NULL;
+
gst_element_class_add_pad_template (element_class, videosrctempl);
gst_element_class_add_pad_template (element_class, audiosrctempl);
gst_element_class_add_pad_template (element_class, sinktempl);