[vlc-commits] avcodec: pass consistent dimensions to hardware decoder

Rémi Denis-Courmont git at videolan.org
Mon Feb 22 06:20:06 CET 2016


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remid at nvidia.com> | Mon Feb 22 07:17:23 2016 +0200| [bdd50cc0d7c316d123974ca9ae35c02f550fdc35] | committer: Rémi Denis-Courmont

avcodec: pass consistent dimensions to hardware decoder

Commit 01c4f44e88bfbb8ecf108c0fe40f3797bddac686 fixed one call site of
vlc_va_Setup() but left the other one silently broken. This should fix
decoding with libvdpau-va-gl (untested).

The original regression was introduced by
commit b71c85b3d88b8d0ad2d4a63bf58ebcd2ad771cbf.

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

 modules/codec/avcodec/video.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 0ecd7fe..c115db9 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1359,10 +1359,10 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
 
         /* We try to call vlc_va_Setup when possible to detect errors when
          * possible (later is too late) */
-        if( p_context->width > 0 && p_context->height > 0
+        if( p_context->coded_width > 0 && p_context->coded_height > 0
          && vlc_va_Setup( p_va, &p_context->hwaccel_context,
                           &p_dec->fmt_out.video.i_chroma,
-                          p_context->width, p_context->height ) )
+                          p_context->coded_width, p_context->coded_height ) )
         {
             msg_Err( p_dec, "acceleration setup failure" );
             break;



More information about the vlc-commits mailing list