[vlc-commits] d3d11va: fix deadlock on error

Steve Lhomme git at videolan.org
Mon May 16 16:53:06 CEST 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon May 16 16:49:47 2016 +0200| [a1526880f337a440111457293c71badf2c14dae7] | committer: Jean-Baptiste Kempf

d3d11va: fix deadlock on error

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

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

 modules/codec/avcodec/d3d11va.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 835b44c..5b3fc10 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -274,7 +274,8 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
                 if (FAILED(hr))
                 {
                     msg_Err(va, "Failed to create the processor output. (hr=0x%lX)", hr);
-                    return VLC_EGENERIC;
+                    ret = VLC_EGENERIC;
+                    goto done;
                 }
             }
 
@@ -289,7 +290,8 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
             if (FAILED(hr))
             {
                 msg_Err(va, "Failed to process the video. (hr=0x%lX)", hr);
-                return VLC_EGENERIC;
+                ret = VLC_EGENERIC;
+                goto done;
             }
         }
         else
@@ -315,6 +317,8 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
         ret = VLC_EGENERIC;
     }
 
+
+done:
 #if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(57, 2, 0, 3, 100)
     if( sys->context_mutex > 0 ) {
         ReleaseMutex( sys->context_mutex );



More information about the vlc-commits mailing list