From 61bd0ed781b56eea1e8e851aab34a2ee3b59fbac Mon Sep 17 00:00:00 2001
From: Vittorio Giovara <vittorio.giovara@gmail.com>
Date: Tue, 5 Jul 2016 16:22:08 -0400
Subject: [PATCH] h264: Log more information about invalid NALu size

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

diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index e252efa7dc4..8492425e448 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -237,7 +237,9 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
                 extract_length = (extract_length << 8) | buf[i];
 
             if (extract_length > length) {
-                av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit size.\n");
+                av_log(logctx, AV_LOG_ERROR,
+                       "Invalid NAL unit size (%d > %d).\n",
+                       extract_length, length);
                 return AVERROR_INVALIDDATA;
             }
             buf     += nal_length_size;
-- 
GitLab