]> git.sesse.net Git - vlc/commitdiff
Used the AVCodecContext given to AVCodecContext::get_buffer() and not the global...
authorLaurent Aimar <fenrir@videolan.org>
Tue, 13 Sep 2011 20:40:08 +0000 (22:40 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 13 Sep 2011 20:52:55 +0000 (22:52 +0200)
The global one may not be in synch when the callback is called.

modules/codec/avcodec/video.c

index e4e69436604da5a24644920a0f9023bf5c79e90c..6595b062d07949bdeca5740ff5db5f2ef18a6526 100644 (file)
@@ -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;