omxvideoenc: If no stride was set for the OMX input 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:10 +01:00
parent 1ef38751c7
commit 7ebef2941b

View file

@ -1106,10 +1106,17 @@ gst_omx_video_enc_fill_buffer (GstOMXVideoEnc * self, GstBuffer * inbuf,
dest_stride = port_def->format.video.nStride;
src_stride =
gst_video_format_get_row_stride (state->format, 0, state->width);
/* XXX: Try this if no stride was set */
if (dest_stride == 0)
dest_stride = src_stride;
} else {
dest_stride = port_def->format.video.nStride / 2;
src_stride =
gst_video_format_get_row_stride (state->format, 1, state->width);
/* XXX: Try this if no stride was set */
if (dest_stride == 0)
dest_stride = src_stride;
}
dest = outbuf->omx_buf->pBuffer + outbuf->omx_buf->nOffset;
@ -1166,10 +1173,16 @@ gst_omx_video_enc_fill_buffer (GstOMXVideoEnc * self, GstBuffer * inbuf,
dest_stride = port_def->format.video.nStride;
src_stride =
gst_video_format_get_row_stride (state->format, 0, state->width);
/* XXX: Try this if no stride was set */
if (dest_stride == 0)
dest_stride = src_stride;
} else {
dest_stride = port_def->format.video.nStride;
src_stride =
gst_video_format_get_row_stride (state->format, 1, state->width);
/* XXX: Try this if no stride was set */
if (dest_stride == 0)
dest_stride = src_stride;
}
dest = outbuf->omx_buf->pBuffer + outbuf->omx_buf->nOffset;