[vlc-commits] packetizer: vc1: do not override container frame rate

Francois Cartegnie git at videolan.org
Mon Oct 7 17:28:22 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Oct  1 15:37:23 2019 +0200| [4e971fe7a44c464327950c4741d96362c51779f8] | committer: Francois Cartegnie

packetizer: vc1: do not override container frame rate

(cherry picked from commit 2c707ee3fc0a9f9ada77698d94a603999c33f06f)

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

 modules/packetizer/vc1.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/packetizer/vc1.c b/modules/packetizer/vc1.c
index 48624ceb14..f25e839ecc 100644
--- a/modules/packetizer/vc1.c
+++ b/modules/packetizer/vc1.c
@@ -576,7 +576,10 @@ static block_t *ParseIDU( decoder_t *p_dec, bool *pb_ts_used, block_t *p_frag )
                     case 2: i_fps_den = 1001; break;
                     }
                 }
-                if( i_fps_num != 0 && i_fps_den != 0 )
+
+                if( i_fps_num != 0 && i_fps_den != 0 &&
+                   (p_dec->fmt_in.video.i_frame_rate == 0 ||
+                    p_dec->fmt_in.video.i_frame_rate_base == 0) )
                     vlc_ureduce( &p_es->video.i_frame_rate, &p_es->video.i_frame_rate_base, i_fps_num, i_fps_den, 0 );
 
                 if( !p_sys->b_sequence_header )



More information about the vlc-commits mailing list