diff libmpcodecs/vd_ffmpeg.c @ 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 9ec31cdc76ad
children e006d3eb4e60
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);