From 1a1504914a41bf19497f1fb17fcfea98daa5ba27 Mon Sep 17 00:00:00 2001 From: xylosper Date: Thu, 12 Sep 2013 21:50:09 +0900 Subject: [PATCH] vd_lavc: reset last_sample_aspect_ratio in uninit_avctx() In init_vo(), if sh->aspect is 0 or last_sample_aspect_ratio is set, sh->aspect is overwritten. With software decoding fallback behaviour, this makes the aspect ratio from container ignored since last_sample_aspect_ratio is already set in first try with hardware decoding. --- video/decode/vd_lavc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 838a3deab2..1838582d04 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -454,6 +454,7 @@ static void uninit_avctx(sh_video_t *sh) #if !HAVE_AVUTIL_REFCOUNTING mp_buffer_pool_free(&ctx->dr1_buffer_pool); #endif + ctx->last_sample_aspect_ratio = (AVRational){0, 0}; } static void uninit(sh_video_t *sh)