[vlc-commits] packetizer: h264: fix frame length
Francois Cartegnie
git at videolan.org
Wed Aug 10 16:47:50 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Aug 10 16:45:39 2016 +0200| [7457f9ad424d98488cbe47d73dfd00ba7e6662bb] | committer: Francois Cartegnie
packetizer: h264: fix frame length
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7457f9ad424d98488cbe47d73dfd00ba7e6662bb
---
modules/packetizer/h264.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index f9097bf..fcedb11 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -624,14 +624,18 @@ static block_t *OutputPicture( decoder_t *p_dec )
p_pic = block_ChainGather( p_sys->p_frame );
}
- unsigned i_num_clock_ts = 1;
- if( p_sys->b_frame_mbs_only == 0 && p_sys->b_pic_struct_present_flag )
+ unsigned i_num_clock_ts = 2;
+ if( p_sys->b_frame_mbs_only == 0 )
{
- if( p_sys->i_pic_struct < 9 )
+ if( p_sys->b_pic_struct_present_flag && p_sys->i_pic_struct < 9 )
{
const uint8_t rgi_numclock[9] = { 1, 1, 1, 2, 2, 3, 3, 2, 3 };
i_num_clock_ts = rgi_numclock[ p_sys->i_pic_struct ];
}
+ else if( p_sys->slice.i_field_pic_flag ) /* See D-1 and E-6 */
+ {
+ i_num_clock_ts = 1;
+ }
}
if( p_sys->i_time_scale && p_pic->i_length == 0 )
More information about the vlc-commits
mailing list