mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-09 19:09:41 +00:00
Fix refcounting on caps.
Original commit message from CVS: Fix refcounting on caps.
This commit is contained in:
parent
5b02345612
commit
479004ceec
1 changed files with 9 additions and 2 deletions
|
@ -415,12 +415,15 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
|||
*/
|
||||
if (outstream && *outstream == NULL) {
|
||||
GstPad **outpad;
|
||||
GstCaps *caps;
|
||||
|
||||
*outstream = gst_mpeg_demux_new_stream ();
|
||||
outpad = &((*outstream)->pad);
|
||||
|
||||
*outpad = gst_pad_new_from_template (newtemp, name);
|
||||
gst_pad_try_set_caps (*outpad, gst_pad_get_pad_template_caps (*outpad));
|
||||
caps = gst_pad_template_get_caps (newtemp);
|
||||
gst_pad_try_set_caps (*outpad, caps);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
gst_pad_set_formats_function (*outpad, gst_mpeg_demux_get_src_formats);
|
||||
gst_pad_set_convert_function (*outpad, gst_mpeg_parse_convert_src);
|
||||
|
@ -853,12 +856,16 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
|||
}
|
||||
|
||||
if (newtemp) {
|
||||
GstCaps *caps;
|
||||
|
||||
*outstream = gst_mpeg_demux_new_stream ();
|
||||
outpad = &((*outstream)->pad);
|
||||
|
||||
/* create the pad and add it to self */
|
||||
*outpad = gst_pad_new_from_template (newtemp, name);
|
||||
gst_pad_try_set_caps (*outpad, gst_pad_get_pad_template_caps (*outpad));
|
||||
caps = gst_pad_template_get_caps (newtemp);
|
||||
gst_pad_try_set_caps (*outpad, caps);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
gst_pad_set_formats_function (*outpad, gst_mpeg_demux_get_src_formats);
|
||||
gst_pad_set_convert_function (*outpad, gst_mpeg_parse_convert_src);
|
||||
|
|
Loading…
Reference in a new issue