X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Favcodec%2Fvideo.c;h=7d7a2fcfa27e5e721473dc74c75e66aa72e2d6cc;hb=76d20512abbc6d7498bc4e49153024993978ed55;hp=3a967b8c9e43c7bdf3be237edfd8485741d92c63;hpb=05e1f72875c3d066da936f4bc25a16cea6ef6aca;p=vlc diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index 3a967b8c9e..7d7a2fcfa2 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -914,7 +914,6 @@ static picture_t *ffmpeg_dr_GetFrameBuf(struct AVCodecContext *p_context) { decoder_t *p_dec = (decoder_t *)p_context->opaque; decoder_sys_t *p_sys = p_dec->p_sys; - vlc_va_t *p_va = p_sys->p_va; int i_width = p_context->width; int i_height = p_context->height; @@ -989,6 +988,9 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context, /* */ p_ff_pic->opaque = NULL; +#if ! LIBAVCODEC_VERSION_CHECK(54, 34, 0, 79, 101) + p_ff_pic->pkt_pts = p_context->pkt ? p_context->pkt->pts : AV_NOPTS_VALUE; +#endif #if LIBAVCODEC_VERSION_MAJOR < 54 p_ff_pic->age = 256*256*256*64; #endif @@ -1021,6 +1023,7 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context, } p_context->draw_horiz_band = NULL; + post_mt( p_sys ); p_ff_pic->opaque = (void*)p_pic; p_ff_pic->type = FF_BUFFER_TYPE_USER; @@ -1034,7 +1037,6 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context, p_ff_pic->linesize[2] = p_pic->p[2].i_pitch; p_ff_pic->linesize[3] = 0; - post_mt( p_sys ); return 0; }