From 739a10d84e85ea949d5b6065c959cf69db62cc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Oct 2014 13:53:01 +0300 Subject: [PATCH] openh264enc: Don't set caps manually This will break the order of events in GStreamer. --- ext/openh264/gstopenh264enc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/openh264/gstopenh264enc.cpp b/ext/openh264/gstopenh264enc.cpp index 8f67dd2bca..6a66d39a83 100644 --- a/ext/openh264/gstopenh264enc.cpp +++ b/ext/openh264/gstopenh264enc.cpp @@ -542,13 +542,12 @@ static gboolean gst_openh264enc_set_format(GstVideoEncoder *encoder, GstVideoCod "pixel-aspect-ratio", GST_TYPE_FRACTION, par_n, par_d, "codec_data", GST_TYPE_BUFFER, codec_data, NULL); - ret = gst_pad_set_caps(GST_VIDEO_ENCODER_SRC_PAD(openh264enc), outcaps); gst_buffer_unref(codec_data); output_state = gst_video_encoder_set_output_state(encoder, outcaps, state); gst_video_codec_state_unref(output_state); - return TRUE; + return gst_video_encoder_negotiate (encoder); } static GstFlowReturn gst_openh264enc_handle_frame(GstVideoEncoder *encoder, GstVideoCodecFrame *frame)