Browse Source

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
tags/n0.8
Baptiste Coudurier 15 years ago
parent
commit
9479415e4e
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/h264_parser.c

+ 3
- 0
libavcodec/h264_parser.c View File

@@ -127,6 +127,9 @@ static inline int parse_nal_units(AVCodecParserContext *s,
h->sei_cpb_removal_delay = -1; h->sei_cpb_removal_delay = -1;
h->sei_buffering_period_present = 0; h->sei_buffering_period_present = 0;


if (!buf_size)
return 0;

for(;;) { for(;;) {
int src_length, dst_length, consumed; int src_length, dst_length, consumed;
buf = ff_find_start_code(buf, buf_end, &state); buf = ff_find_start_code(buf, buf_end, &state);


Loading…
Cancel
Save