changeset 36304:6f0ab9dd1429

Fix definition of sh->original_aspect. Since 0 is a valid aspect ratio, initialization must be different. This has been a bug in r36391.
author ib
date Sun, 04 Aug 2013 18:12:24 +0000
parents b50212f27ffa
children d8a13d907c61
files libmpcodecs/vd.c libmpdemux/demuxer.c
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd.c	Sun Aug 04 13:30:42 2013 +0000
+++ b/libmpcodecs/vd.c	Sun Aug 04 18:12:24 2013 +0000
@@ -292,7 +292,7 @@
     }
     // 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)
--- a/libmpdemux/demuxer.c	Sun Aug 04 13:30:42 2013 +0000
+++ b/libmpdemux/demuxer.c	Sun Aug 04 18:12:24 2013 +0000
@@ -380,6 +380,7 @@
         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;