ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Wed Aug 12 15:03:52 
2020 -0300| [23bbb01077b6e1f623238173be547425159b33bd] | committer: James Almer

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 <jamr...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23bbb01077b6e1f623238173be547425159b33bd
---

 libavcodec/h2645_parse.c | 3 +++
 1 file changed, 3 insertions(+)

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

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to