[vlc-commits] Avcodec: Fix double FPS display

Jean-Baptiste Kempf git at videolan.org
Wed Mar 27 14:57:29 CET 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Mar 27 14:56:13 2013 +0100| [79d91b369223d02bb197884dc3c0971c0b393e35] | committer: Jean-Baptiste Kempf

Avcodec: Fix double FPS display

Close #5671
Patch by "rycius" on trac

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79d91b369223d02bb197884dc3c0971c0b393e35
---

 modules/codec/avcodec/video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 7697ef9..d8ce8a2 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -172,7 +172,7 @@ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
     else if( p_context->time_base.num > 0 && p_context->time_base.den > 0 )
     {
         p_dec->fmt_out.video.i_frame_rate = p_context->time_base.den;
-        p_dec->fmt_out.video.i_frame_rate_base = p_context->time_base.num;
+        p_dec->fmt_out.video.i_frame_rate_base = p_context->time_base.num * __MAX( p_context->ticks_per_frame, 1 );
     }
 
     return decoder_NewPicture( p_dec );



More information about the vlc-commits mailing list