aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-07-23 00:34:09 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-07-23 00:34:09 +0000
commit9479415e4e46e94a0a06a426c7726149dbb29564 (patch)
treed3a2d012282da4fd65cd55c0a6a32a429509621a
parentef011e6d58e4af9a715d95c48a2f9d6f7d35591a (diff)
downloadffmpeg-9479415e4e46e94a0a06a426c7726149dbb29564.tar.gz
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
-rw-r--r--libavcodec/h264_parser.c3
1 files changed, 3 insertions, 0 deletions
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);