basevideodecoder: Use the cached video frame size instead of recalculating it

This commit is contained in:
Sebastian Dröge 2011-08-03 16:02:01 +02:00
parent 04b74947ad
commit 6e4e4e107c

View file

@ -1917,11 +1917,9 @@ gst_base_video_decoder_alloc_src_buffer (GstBaseVideoDecoder *
{
GstBuffer *buffer;
GstFlowReturn flow_ret;
int num_bytes;
GstVideoState *state = &GST_BASE_VIDEO_CODEC (base_video_decoder)->state;
int num_bytes = state->bytes_per_picture;
num_bytes = gst_video_format_get_size (state->format, state->width,
state->height);
GST_DEBUG ("alloc src buffer caps=%" GST_PTR_FORMAT,
GST_PAD_CAPS (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_decoder)));
flow_ret =