]> git.sesse.net Git - vlc/commitdiff
* modules/demux/mp4/mp4.c: work-around buggy muxers which don't set properly the...
authorGildas Bazin <gbazin@videolan.org>
Fri, 12 Mar 2004 11:13:57 +0000 (11:13 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 12 Mar 2004 11:13:57 +0000 (11:13 +0000)
modules/demux/mp4/mp4.c

index e791711c3a01caabf896170324586786ba97f2f3..523d0301df9e89e0b416b1aefe0deedd0a08f1d1 100644 (file)
@@ -1146,7 +1146,9 @@ static int  TrackCreateES   ( input_thread_t   *p_input,
             p_track->fmt.video.i_height = p_track->i_height;
 
         /* Find out apect ratio from display size */
-        if( p_track->i_width > 0 && p_track->i_height > 0 )
+        if( p_track->i_width > 0 && p_track->i_height > 0 &&
+            /* Work-around buggy muxed files */
+            p_sample->data.p_sample_vide->i_width != p_track->i_width )
             p_track->fmt.video.i_aspect =
                 VOUT_ASPECT_FACTOR * p_track->i_width / p_track->i_height;