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.
This commit is contained in:
Michael Smith 2008-08-29 00:27:28 +00:00
parent 35168b4a41
commit 7d4c7bf635
2 changed files with 10 additions and 0 deletions

View file

@ -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):

View file

@ -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);