aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-17 01:56:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-17 02:13:11 +0100
commita86cc0cc1bd2fa6a178a8cb2541283da920c3c3c (patch)
tree2975e8fb212dbd0e05e77dc8b602ea85050f71e5
parentb00a3bf3320645c16b312cd04b1fc2cf2934fae9 (diff)
downloadffmpeg-a86cc0cc1bd2fa6a178a8cb2541283da920c3c3c.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index e2c6744d78..b731da5d53 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -655,7 +655,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)