Commit 87e0627b authored by David Schleef's avatar David Schleef
Browse files

ext/ffmpeg/gstffmpegenc.c: Negotiation fixes.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_init),
(gst_ffmpegenc_connect):  Negotiation fixes.
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_negotiate_format):
Remove inappropriate gst_caps_free().
* sys/ximage/ximagesink.c: (gst_ximagesink_sinkconnect):
Reenable Ronald's internal resize code, since the core handles
it correctly now.
parent fa2f874b
......@@ -241,6 +241,7 @@ gst_ffmpegenc_init(GstFFMpegEnc *ffmpegenc)
ffmpegenc->sinkpad = gst_pad_new_from_template (oclass->sinktempl, "sink");
gst_pad_set_link_function (ffmpegenc->sinkpad, gst_ffmpegenc_connect);
ffmpegenc->srcpad = gst_pad_new_from_template (oclass->srctempl, "src");
gst_pad_use_explicit_caps (ffmpegenc->srcpad);
gst_element_add_pad (GST_ELEMENT (ffmpegenc), ffmpegenc->sinkpad);
gst_element_add_pad (GST_ELEMENT (ffmpegenc), ffmpegenc->srcpad);
......@@ -344,11 +345,11 @@ gst_ffmpegenc_connect (GstPad *pad,
if ((ret = gst_pad_try_set_caps (ffmpegenc->srcpad, other_caps)) <= 0) {
/* FIXME set_explicit_caps is not supposed to be used in a pad link
* function. */
if (!gst_pad_set_explicit_caps (ffmpegenc->srcpad, other_caps)) {
avcodec_close (ffmpegenc->context);
GST_DEBUG ("Failed to set caps on next element for ffmpeg encoder (%s)",
return ret;
/* success! */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment