[vlc-devel] [PATCH] packetizer: h264: always output frame on slice NAL
Francois Cartegnie
fcvlcdev at free.fr
Tue Jan 20 21:37:16 CET 2015
I'm trying to fix bug #2708 and its h264 packetizing issue.
This stream has 5 NAL unit(s) sequence (SEI,SPS,PPS,IDR) with each keyframe, and only a
NALU of type 1 (non IDR) for each other frame.
According to ISO/IEC 14496-10, 7.4.1 Nal Unit Semantics, Table 7.1,
NALU Type 1 has no partitioning and can embed type 2, 3 and 4 info.
Only SEI and sequence markers should be left then.
7.4.1.2.3 Order of NAL Units (...)
Shows that for Type 1, the SEI is always sent before.
I'm assuming that a "non IDR" NALY always marks end of slice.
Not fully sure about this,
but solves playback problems, as long as you also ignore the other PTS/PCR problem for
that sample as well with --no-ts-trust-pcr
Francois
---
modules/packetizer/h264.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 76f7d76..e9648bb 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -1094,6 +1094,9 @@ static void ParseSlice( decoder_t *p_dec, bool *pb_new_picture, slice_t *p_slice
( slice.i_nal_type != p_sys->slice.i_nal_type || slice.i_idr_pic_id != p_sys->slice.i_idr_pic_id ) )
b_pic = true;
+ if( slice.i_nal_type == NAL_SLICE )
+ b_pic = true;
+
/* */
*pb_new_picture = b_pic;
*p_slice = slice;
--
2.1.0
More information about the vlc-devel
mailing list