changeset 24302:7d58773ead24

moved to reinit_video_chain() the assignment of sh_video->stream_aspect, where it makes more sense
author nicodvb
date Sat, 01 Sep 2007 20:56:45 +0000
parents 15d547dfa66b
children 21d181441aa4
files mplayer.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat Sep 01 18:49:51 2007 +0000
+++ b/mplayer.c	Sat Sep 01 20:56:45 2007 +0000
@@ -1887,6 +1887,7 @@
 
 int reinit_video_chain(void) {
     sh_video_t * const sh_video = mpctx->sh_video;
+    double ar=-1.0;
     //================== Init VIDEO (codec & libvo) ==========================
     if(!fixed_vo || !(inited_flags&INITED_VO)){
     current_module="preinit_libvo";
@@ -1902,6 +1903,8 @@
     inited_flags|=INITED_VO;
   }
 
+  if(stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_ASPECT_RATIO, &ar) != STREAM_UNSUPPORTED)
+      mpctx->sh_video->stream_aspect = ar;
   current_module="init_video_filters";
   {
     char* vf_arg[] = { "_oldargs_", (char*)mpctx->video_out , NULL };
@@ -3067,7 +3070,6 @@
 
 if(mpctx->sh_video){
 
-  double ar=-1.0;
   current_module="video_read_properties";
   if(!video_read_properties(mpctx->sh_video)) {
     mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotReadVideoProperties);
@@ -3089,8 +3091,6 @@
       mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_FPSnotspecified);
       mpctx->sh_video=mpctx->d_video->sh=NULL;
     }
-    if(stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_ASPECT_RATIO, &ar) != STREAM_UNSUPPORTED)
-      mpctx->sh_video->stream_aspect = ar;
   }
 
 }