diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 01ea016409..cff801f613 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -83,12 +83,12 @@ static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf, for (i = 0; i < buf_size; i++) { if (i >= next_avc) { - uint32_t nalsize = 0; + int64_t nalsize = 0; i = next_avc; for (j = 0; j < p->nal_length_size; j++) nalsize = (nalsize << 8) | buf[i++]; if (!nalsize || nalsize > buf_size - i) { - av_log(logctx, AV_LOG_ERROR, "AVC-parser: nal size %"PRIu32" " + av_log(logctx, AV_LOG_ERROR, "AVC-parser: nal size %"PRId64" " "remaining %d\n", nalsize, buf_size - i); return buf_size; }