diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-17 01:56:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-12 18:03:49 +0100 |
commit | c78ed1fb5d3338634cdd79b1b8edf246a4ab7177 (patch) | |
tree | bf01254a05ea7f39cd2d0cee487dab7c4e44025c | |
parent | 00cde0cddc569ccd34f05ae188d47e006f16aafc (diff) | |
download | ffmpeg-c78ed1fb5d3338634cdd79b1b8edf246a4ab7177.tar.gz |
avcodec/flac_parser: fix handling EOF if no headers are found
Fixes assertion failure
Fixes Ticket4269
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c4d85fc23c100f7a27d9bad710eb153214868e27)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/flac_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index ae7edaa052..6be2df3f20 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -646,7 +646,7 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx, handle_error: *poutbuf = NULL; *poutbuf_size = 0; - return read_end - buf; + return buf_size ? read_end - buf : 0; } static int flac_parse_init(AVCodecParserContext *c) |