]> git.sesse.net Git - vlc/commitdiff
ckport of [11175]
authorChristophe Mutricy <xtophe@videolan.org>
Fri, 27 May 2005 12:35:57 +0000 (12:35 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Fri, 27 May 2005 12:35:57 +0000 (12:35 +0000)
modules/access/dshow/dshow.cpp

index c041cef940d76406d7949a072d8b5d606e2c8aef..c8a93d1155e28f579823d9e9b092b6738cbc544c 100644 (file)
@@ -530,8 +530,13 @@ static int DemuxOpen( vlc_object_t *p_this )
                 fmt.video.i_gmask = 0x0000ff00;
                 fmt.video.i_rmask = 0x000000ff;
             }
-            fmt.video.i_frame_rate = 10000000000ULL/p_stream->header.video.AvgTimePerFrame;
-            fmt.video.i_frame_rate_base = 1000;
+
+            if( p_stream->header.video.AvgTimePerFrame )
+            {
+                fmt.video.i_frame_rate = 10000000;
+                fmt.video.i_frame_rate_base =
+                    p_stream->header.video.AvgTimePerFrame;
+            }
         }
         else if( p_stream->mt.majortype == MEDIATYPE_Audio )
         {