[MPlayer-cvslog] r36400 - in trunk: libmpcodecs/vd.c libmpdemux/demuxer.c

ib subversion at mplayerhq.hu
Sun Aug 4 20:12:25 CEST 2013


Author: ib
Date: Sun Aug  4 20:12:24 2013
New Revision: 36400

Log:
Fix definition of sh->original_aspect.

Since 0 is a valid aspect ratio,
initialization must be different.

This has been a bug in r36391.

Modified:
   trunk/libmpcodecs/vd.c
   trunk/libmpdemux/demuxer.c

Modified: trunk/libmpcodecs/vd.c
==============================================================================
--- trunk/libmpcodecs/vd.c	Sun Aug  4 15:30:42 2013	(r36399)
+++ trunk/libmpcodecs/vd.c	Sun Aug  4 20:12:24 2013	(r36400)
@@ -292,7 +292,7 @@ int mpcodecs_config_vo(sh_video_t *sh, i
     }
     // time to do aspect ratio corrections...
 
-    if (!sh->original_aspect)
+    if (sh->original_aspect == -1.0)
         sh->original_aspect = sh->stream_aspect != 0.0 ? sh->stream_aspect : sh->aspect;
 
     if (movie_aspect > -1.0)

Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c	Sun Aug  4 15:30:42 2013	(r36399)
+++ trunk/libmpdemux/demuxer.c	Sun Aug  4 20:12:24 2013	(r36400)
@@ -380,6 +380,7 @@ sh_video_t *new_sh_video_vid(demuxer_t *
         mp_msg(MSGT_DEMUXER, MSGL_WARN, MSGTR_VideoStreamRedefined, id);
     else {
         sh_video_t *sh = calloc(1, sizeof(sh_video_t));
+        sh->original_aspect = -1.0;
         mp_msg(MSGT_DEMUXER, MSGL_V, "==> Found video stream: %d\n", id);
         demuxer->v_streams[id] = sh;
         sh->vid = vid;


More information about the MPlayer-cvslog mailing list