changeset 24300:4ad15f9bff3b

if the stream reader supports it assign to the video the stream aspect ratio
author nicodvb
date Sat, 01 Sep 2007 15:56:19 +0000
parents 725638f690bb
children 15d547dfa66b
files mplayer.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat Sep 01 15:54:45 2007 +0000
+++ b/mplayer.c	Sat Sep 01 15:56:19 2007 +0000
@@ -3067,6 +3067,7 @@
 
 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);
@@ -3088,6 +3089,8 @@
       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;
   }
 
 }