changeset 32603:02830ab7afb7

Reset ctx->vo_initialized to 0 on a resolution change. Otherwise we might think the filter chain/vo is ready when it actually is not, leading to a crash. Fixes crash part of bug 1156.
author reimar
date Sat, 11 Dec 2010 18:37:00 +0000
parents 1cedf73225e0
children 3ba59e647e58
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sat Dec 11 17:45:41 2010 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sat Dec 11 18:37:00 2010 +0000
@@ -554,6 +554,7 @@
         pix_fmt != ctx->pix_fmt ||
         !ctx->vo_initialized)
     {
+        ctx->vo_initialized = 0;
         // this is a special-case HACK for MPEG-1/2 VDPAU that uses neither get_format nor
         // sets the value correctly in avcodec_open.
         set_format_params(avctx, avctx->pix_fmt);