[FFmpeg-cvslog] avcodec/flac_parser: fix handling EOF if no headers are found

Michael Niedermayer git at videolan.org
Fri Mar 13 17:49:01 CET 2015


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 17 01:56:03 2015 +0100| [de84d683b28974d9e83b3d6ce1bd8f11d225babe] | committer: Michael Niedermayer

avcodec/flac_parser: fix handling EOF if no headers are found

Fixes assertion failure
Fixes Ticket4269

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit c4d85fc23c100f7a27d9bad710eb153214868e27)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de84d683b28974d9e83b3d6ce1bd8f11d225babe
---

 libavcodec/flac_parser.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index 52ec1ee..0d28c85 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)



More information about the ffmpeg-cvslog mailing list