mfc: Only add crop metadata if required

This commit is contained in:
Sebastian Dröge 2013-01-02 17:23:51 +01:00
parent 83ea8f1256
commit 204ec7efd5

View file

@ -526,7 +526,8 @@ gst_mfc_dec_fill_outbuf (GstMFCDec * self, GstBuffer * outbuf,
zerocopy = (gst_buffer_n_memory (outbuf) == 1
&& (mem = gst_buffer_peek_memory (outbuf, 0))
&& strcmp (mem->allocator->mem_type, "GstEGLImage") == 0);
has_cropping = self->has_cropping;
has_cropping = self->has_cropping && (self->width != self->crop_width
|| self->height != self->crop_heigth);
/* We only do cropping if we do zerocopy and downstream
* supports cropping. For non-zerocopy we can do cropping