[vlc-commits] avcodec: remove redundant vlc_va_Setup() call

Rémi Denis-Courmont git at videolan.org
Sun Sep 27 21:55:01 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep 27 15:16:47 2015 +0300| [877fb3b5345b3ba54e06b0ca1a32ec7e1798addd] | committer: Rémi Denis-Courmont

avcodec: remove redundant vlc_va_Setup() call

This call was originally meant to adjust the hardware acceleration to
video size changes, but that cannot happen there anymore. Also errors
cannot be handled properly there either.

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

 modules/codec/avcodec/video.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 3537b1e..2eaa16f 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1052,16 +1052,7 @@ static int lavc_GetFrame(struct AVCodecContext *ctx, AVFrame *frame, int flags)
     frame->opaque = NULL;
 
     wait_mt(sys);
-    if (sys->p_va != NULL)
-    {   /* TODO: Move this to get_format(). We are screwed if it fails here. */
-        if (vlc_va_Setup(sys->p_va, ctx, &dec->fmt_out.video.i_chroma))
-        {
-            post_mt(sys);
-            msg_Err(dec, "hardware acceleration setup failed");
-            return -1;
-        }
-    }
-    else if (!sys->b_direct_rendering)
+    if (sys->p_va == NULL && !sys->b_direct_rendering)
     {
         post_mt(sys);
         return avcodec_default_get_buffer2(ctx, frame, flags);



More information about the vlc-commits mailing list