diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2011-03-30 10:18:23 +0200 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2011-05-16 20:32:23 +0200 |
commit | 1b151caf11829d10705bcb907bab53d5f0022884 (patch) | |
tree | f89d7909536680086f2e84bc82080deecfa6bd4f /ext/vp8 | |
parent | 550237347b61969958deec9225111a19e0edc36e (diff) |
basevideodecoder: really and only set src pad caps whenever requested
... since subclass is expected to be wise enough to know when to do so.
Diffstat (limited to 'ext/vp8')
-rw-r--r-- | ext/vp8/gstvp8dec.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/ext/vp8/gstvp8dec.c b/ext/vp8/gstvp8dec.c index 9b24dbdfd..76dcc2345 100644 --- a/ext/vp8/gstvp8dec.c +++ b/ext/vp8/gstvp8dec.c @@ -399,11 +399,11 @@ gst_vp8_dec_handle_frame (GstBaseVideoDecoder * decoder, GstVideoFrame * frame) return GST_FLOW_OK; } - /* should set size here */ state->width = stream_info.w; state->height = stream_info.h; state->format = GST_VIDEO_FORMAT_I420; gst_vp8_dec_send_tags (dec); + gst_base_video_decoder_set_src_caps (decoder); caps = vpx_codec_get_caps (&vpx_codec_vp8_dx_algo); @@ -445,21 +445,6 @@ gst_vp8_dec_handle_frame (GstBaseVideoDecoder * decoder, GstVideoFrame * frame) if (!GST_BUFFER_FLAG_IS_SET (frame->sink_buffer, GST_BUFFER_FLAG_DELTA_UNIT)) gst_base_video_decoder_set_sync_point (decoder); -#if 0 - if (GST_PAD_CAPS (GST_BASE_VIDEO_CODEC_SRC_PAD (decoder)) == NULL) { - GstCaps *caps; - - caps = gst_video_format_new_caps (decoder->state.format, - decoder->state.width, decoder->state.height, - decoder->state.fps_n, decoder->state.fps_d, - decoder->state.par_n, decoder->state.par_d); - - GST_DEBUG ("setting caps %" GST_PTR_FORMAT, caps); - - gst_pad_set_caps (GST_BASE_VIDEO_CODEC_SRC_PAD (decoder), caps); - } -#endif - deadline = gst_base_video_decoder_get_max_decode_time (decoder, frame); if (deadline < 0) { decoder_deadline = 1; |