mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
theora: Fix alignment of frames when converting
Fix logic inversion in calculating the offset in the theora frame when copying to a GStreamer frame.
This commit is contained in:
parent
e34abf228d
commit
dcf556893f
1 changed files with 2 additions and 2 deletions
|
@ -1174,9 +1174,9 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf, GstBuffer ** out)
|
|||
GST_BUFFER_DATA (*out) + gst_video_format_get_component_offset (format,
|
||||
plane, dec->width, dec->height);
|
||||
src = buf[plane].data;
|
||||
src += ((height < dec->height) ? dec->offset_y : dec->offset_y / 2)
|
||||
src += ((height == dec->height) ? dec->offset_y : dec->offset_y / 2)
|
||||
* buf[plane].stride;
|
||||
src += (width < dec->width) ? dec->offset_x : dec->offset_x / 2;
|
||||
src += (width == dec->width) ? dec->offset_x : dec->offset_x / 2;
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
memcpy (dest, src, width);
|
||||
|
|
Loading…
Reference in a new issue