]> git.sesse.net Git - vlc/commitdiff
omxil: Clear the stride and slice height before setting port params on raspberry pi
authorMartin Storsjö <martin@martin.st>
Fri, 22 Mar 2013 09:06:13 +0000 (11:06 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 22 Mar 2013 16:09:32 +0000 (18:09 +0200)
This fixes cases where the OMX decoder previously errored out,
when decoding videos with odd resolutions.

Signed-off-by: Martin Storsjö <martin@martin.st>
modules/codec/omxil/omxil.c

index eff2375d112e5d2dde4a69f42c89b894a84f4c9d..bad3ad16b096002d122eb4cedb9a32c74247d76e 100644 (file)
@@ -180,6 +180,15 @@ static OMX_ERRORTYPE ImplementationSpecificWorkarounds(decoder_t *p_dec,
         }
     }
 #endif
+#ifdef RPI_OMX
+    else if (!strcmp(p_sys->psz_component, "OMX.broadcom.video_decode"))
+    {
+        /* Clear these fields before setting parameters, to allow the codec
+         * fill in what it wants (instead of rejecting whatever happened to
+         * be there. */
+        def->format.video.nStride = def->format.video.nSliceHeight = 0;
+    }
+#endif
 
     return OMX_ErrorNone;
 }