1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avcodec/h2645_parse: reset the H2645NAL type value before parsing a NAL header

This will prevent reporting a bogus value in the log message when
the header parsing fails.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2020-08-12 15:03:52 -03:00
parent 1e41a9be34
commit 23bbb01077

View File

@@ -501,6 +501,9 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
if (ret < 0)
return ret;
/* Reset type in case it contains a stale value from a previously parsed NAL */
nal->type = 0;
if (codec_id == AV_CODEC_ID_HEVC)
ret = hevc_parse_nal_header(nal, logctx);
else