[MOVED FROM BAD 073/134] basevideodecoder: really and only set src pad caps whenever requested

... since subclass is expected to be wise enough to know when to do so.
This commit is contained in:
Mark Nauwelaerts 2011-03-30 10:18:23 +02:00 committed by Sebastian Dröge
parent 47067f7d1e
commit e8a200c6a2

View file

@ -399,11 +399,11 @@ gst_vp8_dec_handle_frame (GstBaseVideoDecoder * decoder, GstVideoFrame * frame)
return GST_FLOW_OK; return GST_FLOW_OK;
} }
/* should set size here */
state->width = stream_info.w; state->width = stream_info.w;
state->height = stream_info.h; state->height = stream_info.h;
state->format = GST_VIDEO_FORMAT_I420; state->format = GST_VIDEO_FORMAT_I420;
gst_vp8_dec_send_tags (dec); gst_vp8_dec_send_tags (dec);
gst_base_video_decoder_set_src_caps (decoder);
caps = vpx_codec_get_caps (&vpx_codec_vp8_dx_algo); 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)) if (!GST_BUFFER_FLAG_IS_SET (frame->sink_buffer, GST_BUFFER_FLAG_DELTA_UNIT))
gst_base_video_decoder_set_sync_point (decoder); 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); deadline = gst_base_video_decoder_get_max_decode_time (decoder, frame);
if (deadline < 0) { if (deadline < 0) {
decoder_deadline = 1; decoder_deadline = 1;