changeset 36075:b14ea6320969

Ensure we call init_vo at the end of get_format to ensure the vo is properly initialized. This seems to fix bug #2135.
author reimar
date Fri, 05 Apr 2013 14:24:54 +0000
parents fbbf13706c50
children e0a9f63abfdd
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Fri Apr 05 14:21:40 2013 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Fri Apr 05 14:24:54 2013 +0000
@@ -1001,8 +1001,10 @@
         }
     }
     selected_format = fmt[i];
-    if (selected_format == PIX_FMT_NONE)
+    if (selected_format == PIX_FMT_NONE) {
         selected_format = avcodec_default_get_format(avctx, fmt);
+        init_vo(sh, selected_format);
+    }
     set_format_params(avctx, selected_format);
     return selected_format;
 }