Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-08-12 21:03:52 +0300
committerJames Almer <jamrial@gmail.com>2020-08-20 19:50:11 +0300
commit23bbb01077b6e1f623238173be547425159b33bd (patch)
tree484431083e8b4d64a01e948633d3566bb8c73d56 /libavcodec/h2645_parse.c
parent1e41a9be3402b1cd76ae575488d141a8a0c06d81 (diff)
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>
Diffstat (limited to 'libavcodec/h2645_parse.c')
-rw-r--r--libavcodec/h2645_parse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 7137af2ee4..0f98b49fbe 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -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