From 9479415e4e46e94a0a06a426c7726149dbb29564 Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Fri, 23 Jul 2010 00:34:09 +0000 Subject: [PATCH] In h264 parser, return immediately if buf_size is 0, avoid printing erroneous message for last frame. Originally committed as revision 24450 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264_parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 890e0a8930..70d08f4254 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -127,6 +127,9 @@ static inline int parse_nal_units(AVCodecParserContext *s, h->sei_cpb_removal_delay = -1; h->sei_buffering_period_present = 0; + if (!buf_size) + return 0; + for(;;) { int src_length, dst_length, consumed; buf = ff_find_start_code(buf, buf_end, &state);