aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-17 01:56:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-13 20:48:09 +0100
commitcb7d72ed1814b41d42d2d293ca7c16bcdd1137c1 (patch)
tree7a116a84537d1e5925a9d5837873d0d5f55006ea /libavcodec
parent74c7273b5d5c39c6fb12adbab3e98d71c96df5ad (diff)
downloadffmpeg-cb7d72ed1814b41d42d2d293ca7c16bcdd1137c1.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>
Diffstat (limited to 'libavcodec')
-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 a031dbfc62..7faf1389ea 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -697,7 +697,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 av_cold int flac_parse_init(AVCodecParserContext *c)