omxvideodec: If no stride was set for the OMX output port assume GStreamer stride

This is not really correct but there's nothing else we could do.
This commit is contained in:
Sebastian Dröge 2011-11-02 10:39:50 +01:00
parent 7ebef2941b
commit ec9dde48e5

View file

@ -520,10 +520,18 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self, GstOMXBuffer * inbuf,
src_stride = port_def->format.video.nStride;
dest_stride =
gst_video_format_get_row_stride (state->format, 0, state->width);
/* XXX: Try this if no stride was set */
if (src_stride == 0)
src_stride = dest_stride;
} else {
src_stride = port_def->format.video.nStride / 2;
dest_stride =
gst_video_format_get_row_stride (state->format, 1, state->width);
/* XXX: Try this if no stride was set */
if (src_stride == 0)
src_stride = dest_stride;
}
src = inbuf->omx_buf->pBuffer + inbuf->omx_buf->nOffset;
@ -564,10 +572,18 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self, GstOMXBuffer * inbuf,
src_stride = port_def->format.video.nStride;
dest_stride =
gst_video_format_get_row_stride (state->format, 0, state->width);
/* XXX: Try this if no stride was set */
if (src_stride == 0)
src_stride = dest_stride;
} else {
src_stride = port_def->format.video.nStride;
dest_stride =
gst_video_format_get_row_stride (state->format, 1, state->width);
/* XXX: Try this if no stride was set */
if (src_stride == 0)
src_stride = dest_stride;
}
src = inbuf->omx_buf->pBuffer + inbuf->omx_buf->nOffset;