basevideodecoder: Use the cached video frame size instead of recalculating it
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 3 Aug 2011 14:02:01 +0000 (16:02 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 3 Aug 2011 14:02:01 +0000 (16:02 +0200)
omx/gstbasevideodecoder.c

index 0278abc..5392d44 100644 (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 =