[FFmpeg-devel] [PATCH] lavc/hevc_parser: add 4 bytes startcode condition in hevc_find_frame_end

Michael Niedermayer michael at niedermayer.cc
Wed Nov 28 20:14:06 EET 2018


On Tue, Nov 27, 2018 at 08:16:55PM +0800, Linjie Fu wrote:
> The startcode before VPS,SPS,PPS and the first NALU in an AU is 4 bytes.
> Blindly taking the startcode as 3 bytes will leave 0x00 in last packet
> and may lead to some warnings in parse_nal_units when s->flags is set to
> PARSER_FLAG_COMPLETE_FRAMES.
> 
> Add 4 bytes startcode condition in hevc_find_frame_end.
> Modify the code to print the buf_size like in H264 and reduce the duplication.
> 
> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> ---
>  libavcodec/hevc_parser.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)

breaks
 make fate-hevc-bsf-mp4toannexb
TEST    hevc-bsf-mp4toannexb
--- -	2018-11-28 19:12:47.869732022 +0100
+++ tests/data/fate/hevc-bsf-mp4toannexb	2018-11-28 19:12:47.864276885 +0100
@@ -1 +1 @@
-1873662a3af1848c37e4eb25722c8df9
+73019329ed7f81c24f9af67c34c640c0
Test hevc-bsf-mp4toannexb failed. Look at tests/data/fate/hevc-bsf-mp4toannexb.err for details.
make: *** [fate-hevc-bsf-mp4toannexb] Error 1

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181128/3690c575/attachment.sig>


More information about the ffmpeg-devel mailing list