vlc | branch: master | Laurent Aimar <[email protected]> | Tue Sep 13 00:37:33 2011 +0200| [a4820b53a72903182b198435fabc50d1478fd3b0] | committer: Laurent Aimar
Used the AVCodecContext given to AVCodecContext::get_format() 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=a4820b53a72903182b198435fabc50d1478fd3b0 --- modules/codec/avcodec/video.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index 3a272b8..e4e6943 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -1159,14 +1159,14 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, #endif if( p_sys->p_va && - p_sys->p_context->width > 0 && p_sys->p_context->height > 0 ) + p_context->width > 0 && p_context->height > 0 ) { /* We try to call vlc_va_Setup when possible to detect errors when * possible (later is too late) */ if( vlc_va_Setup( p_sys->p_va, - &p_sys->p_context->hwaccel_context, + &p_context->hwaccel_context, &p_dec->fmt_out.video.i_chroma, - p_sys->p_context->width, p_sys->p_context->height ) ) + p_context->width, p_context->height ) ) { msg_Err( p_dec, "vlc_va_Setup failed" ); vlc_va_Delete( p_sys->p_va ); @@ -1183,7 +1183,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, * even if a new pixel format is renegociated */ p_sys->b_direct_rendering = false; - p_sys->p_context->draw_horiz_band = NULL; + p_context->draw_horiz_band = NULL; return pi_fmt[i]; } } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
