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:00 +0100
commit8babbdc9b15fd7eb702ab49cd2054d0138fa59bf (patch)
tree681ffb439ca3b50af86f2ce93a94df8bb7f5c484
parente91df69cf2046b785598c0c125afb53dab26b5ea (diff)
downloadffmpeg-8babbdc9b15fd7eb702ab49cd2054d0138fa59bf.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 ba1f060fd9..0512575d85 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -685,7 +685,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)