[vlc-commits] omxil: Keep the old frame height as plane size (nSliceHeight)

Martin Storsjö git at videolan.org
Sat May 12 03:32:11 CEST 2012


vlc | branch: master | Martin Storsjö <martin at martin.st> | Tue May  8 10:46:39 2012 +0300| [29988fbd1c2c6b3284f55b098c54a17fe00aa6cf] | committer: Jean-Baptiste Kempf

omxil: Keep the old frame height as plane size (nSliceHeight)

If the decoder returns a new size via the crop rect, but hasn't
explicitly indicated a plane height (via the nSliceHeight parameter),
keep the frame height as plane height instead.

Also do the same check for stride vs width. The decoders that had
problems that the nSliceHeight fixes do set nStride properly, so
that part won't be needed there, but might be needed on some
platform.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29988fbd1c2c6b3284f55b098c54a17fe00aa6cf
---

 modules/codec/omxil/omxil.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 80d327e..f7e3c48 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -460,6 +460,10 @@ static OMX_ERRORTYPE GetPortDefinition(decoder_t *p_dec, OmxPort *p_port,
         omx_error = OMX_GetConfig(p_port->omx_handle, OMX_IndexConfigCommonOutputCrop, &crop_rect);
         if (omx_error == OMX_ErrorNone)
         {
+            if (!def->format.video.nSliceHeight)
+                def->format.video.nSliceHeight = def->format.video.nFrameHeight;
+            if (!def->format.video.nStride)
+                def->format.video.nStride = def->format.video.nFrameWidth;
             p_fmt->video.i_width = crop_rect.nWidth;
             p_fmt->video.i_visible_width = crop_rect.nWidth;
             p_fmt->video.i_height = crop_rect.nHeight;



More information about the vlc-commits mailing list