[vlc-commits] packetizer: h264: set frame rate from vui when possible
Francois Cartegnie
git at videolan.org
Thu Dec 24 01:45:16 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 23 17:44:28 2015 +0100| [b73ac5bdaed7e3c870fb7a4de2125128eea0d0de] | committer: Francois Cartegnie
packetizer: h264: set frame rate from vui when possible
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b73ac5bdaed7e3c870fb7a4de2125128eea0d0de
---
modules/packetizer/h264.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 9c9a2ee..bdb8dd4 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -757,8 +757,13 @@ static void PutSPS( decoder_t *p_dec, block_t *p_frag )
p_sys->b_cpb_dpb_delays_present_flag = p_sps->vui.b_cpb_dpb_delays_present_flag;
p_sys->i_cpb_removal_delay_length_minus1 = p_sps->vui.i_cpb_removal_delay_length_minus1;
p_sys->i_dpb_output_delay_length_minus1 = p_sps->vui.i_dpb_output_delay_length_minus1;
- }
+ if( p_sps->vui.b_fixed_frame_rate && !p_dec->fmt_out.video.i_frame_rate_base )
+ {
+ p_dec->fmt_out.video.i_frame_rate_base = p_sps->vui.i_num_units_in_tick;
+ p_dec->fmt_out.video.i_frame_rate = p_sps->vui.i_time_scale;
+ }
+ }
/* We have a new SPS */
if( !p_sys->b_sps )
msg_Dbg( p_dec, "found NAL_SPS (sps_id=%d)", p_sps->i_id );
More information about the vlc-commits
mailing list