[vlc-commits] avcodec: fix potential multiple free of hwaccel module

Rémi Denis-Courmont git at videolan.org
Fri Jul 19 17:57:40 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 19 18:54:49 2013 +0300| [701413ebf56b6dcf3096f2c2afbec04f4d66f63a] | committer: Rémi Denis-Courmont

avcodec: fix potential multiple free of hwaccel module

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

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

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index f4421ac..c6e6fed 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1175,9 +1175,8 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
     msg_Err( p_dec, "acceleration not available" );
     vlc_va_Delete( p_va );
 
-    p_sys->p_va = NULL;
-
 end:
     /* Fallback to default behaviour */
+    p_sys->p_va = NULL;
     return avcodec_default_get_format( p_context, pi_fmt );
 }



More information about the vlc-commits mailing list