]> git.sesse.net Git - vlc/commitdiff
* modules/codec/ffmpeg/video.c: use frame-rate from container, if available (Closes...
authorGildas Bazin <gbazin@videolan.org>
Sun, 27 Nov 2005 18:38:51 +0000 (18:38 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 27 Nov 2005 18:38:51 +0000 (18:38 +0000)
modules/codec/ffmpeg/video.c

index ac082a97c50a424fce0ae8f8b4697fafcf6e2e0c..ee3dc7d8c973c82cb008b5961ee95e622633c9ea 100644 (file)
@@ -187,6 +187,15 @@ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
         }
     }
 
+    if( p_dec->fmt_out.video.i_frame_rate > 0 &&
+        p_dec->fmt_out.video.i_frame_rate_base > 0 )
+    {
+        p_dec->fmt_out.video.i_frame_rate =
+            p_dec->fmt_in.video.i_frame_rate;
+        p_dec->fmt_out.video.i_frame_rate_base =
+            p_dec->fmt_out.video.i_frame_rate_base;
+    }
+    else
 #if LIBAVCODEC_BUILD >= 4754
     if( p_context->time_base.num > 0 && p_context->time_base.den > 0 )
     {