From: Thomas Vander Stichele Date: Thu, 29 Apr 2004 17:38:07 +0000 (+0000) Subject: use GST_PAD_CAPS if they exist X-Git-Tag: RELEASE-0_8_1~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=acdea61ebc0e5b31e1956cdcb5126ed70cf168b2;p=platform%2Fupstream%2Fgst-libav.git use GST_PAD_CAPS if they exist Original commit message from CVS: use GST_PAD_CAPS if they exist --- diff --git a/ChangeLog b/ChangeLog index d44d7c1..672bafd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-04-29 Thomas Vander Stichele + + * ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_getcaps): + use GST_PAD_CAPS if they exist so we don't renegotiate needlessly + 2004-04-22 Ronald Bultje * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), diff --git a/ext/ffmpeg/gstffmpegcolorspace.c b/ext/ffmpeg/gstffmpegcolorspace.c index 635851a..74d18d0 100644 --- a/ext/ffmpeg/gstffmpegcolorspace.c +++ b/ext/ffmpeg/gstffmpegcolorspace.c @@ -154,7 +154,12 @@ gst_ffmpegcsp_getcaps (GstPad * pad) otherpad = (pad == space->srcpad) ? space->sinkpad : space->srcpad; - othercaps = gst_pad_get_allowed_caps (otherpad); + /* use already negotiated caps if they exist */ + if (GST_PAD_CAPS (otherpad)) + othercaps = gst_caps_copy (GST_PAD_CAPS (otherpad)); + if (!othercaps) + othercaps = gst_pad_get_allowed_caps (otherpad); + othercaps = gst_ffmpegcsp_caps_remove_format_info (othercaps);