[FFmpeg-devel] [PATCH V2] lavf/mov: atom box parsing return eof cause play fail
tiejun.peng
tiejun.peng at foxmail.com
Fri Dec 8 18:48:03 EET 2017
fix eof lead to play fail.
Signed-off-by: tiejun.peng <tiejun.peng at foxmail.com>
---
libavformat/mov.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 180b6f4..870fdd6 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6632,7 +6632,9 @@ static int mov_read_header(AVFormatContext *s)
do {
if (mov->moov_retry)
avio_seek(pb, 0, SEEK_SET);
- if ((err = mov_read_default(mov, pb, atom)) < 0) {
+ /* EOF don't mean the file to play fail*/
+ err = mov_read_default(mov, pb, atom);
+ if (err < 0 && err != AVERROR_EOF) {
av_log(s, AV_LOG_ERROR, "error reading header\n");
mov_read_close(s);
return err;
--
2.7.4
More information about the ffmpeg-devel
mailing list