summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorxylosper <darklin20@gmail.com>2013-09-12 21:50:09 +0900
committerwm4 <wm4@nowhere>2013-09-13 21:32:29 +0200
commit1a1504914a41bf19497f1fb17fcfea98daa5ba27 (patch)
treeb547ec9f6211b9b1d3ab9f2f93c8d7d7e03ade73 /video
parentea1200111d984e697b5b9d789d23db3f8f73e209 (diff)
downloadmpv-1a1504914a41bf19497f1fb17fcfea98daa5ba27.tar.bz2
mpv-1a1504914a41bf19497f1fb17fcfea98daa5ba27.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c1
1 files changed, 1 insertions, 0 deletions
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)