[vlc-commits] Used the AVCodecContext given to AVCodecContext::get_buffer() and not the global one.

Laurent Aimar git at videolan.org
Tue Sep 13 22:59:27 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Sep 13 22:40:08 2011 +0200| [fec1494dcbaf6fa7d32c033796dcc8bd9c5bcd03] | committer: Laurent Aimar

Used the AVCodecContext given to AVCodecContext::get_buffer() and not the global one.

The global one may not be in synch when the callback is called.

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

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

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index e4e6943..6595b06 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -947,8 +947,8 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
 #ifdef HAVE_AVCODEC_VA
         /* hwaccel_context is not present in old ffmpeg version */
         if( vlc_va_Setup( p_sys->p_va,
-                          &p_sys->p_context->hwaccel_context, &p_dec->fmt_out.video.i_chroma,
-                          p_sys->p_context->width, p_sys->p_context->height ) )
+                          &p_context->hwaccel_context, &p_dec->fmt_out.video.i_chroma,
+                          p_context->width, p_context->height ) )
         {
             msg_Err( p_dec, "vlc_va_Setup failed" );
             return -1;



More information about the vlc-commits mailing list