[FFmpeg-devel] [PATCH] libavformat/mov:the "stco" box parse no need return eof.
tiejun.peng
tiejun.peng at foxmail.com
Thu Nov 30 09:18:47 EET 2017
discard corrupted track and good track have chance to play.
Signed-off-by: tiejun.peng <tiejun.peng at foxmail.com>
---
libavformat/mov.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c901859..5c2ce39 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1991,8 +1991,10 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc->chunk_count = i;
- if (pb->eof_reached)
- return AVERROR_EOF;
+ if (i < entries) {
+ av_log(c->fc, AV_LOG_WARNING, "stream id[0x%x]: corrupted STCO atom\n", st->id);
+ st->discard = AVDISCARD_ALL;
+ }
return 0;
}
--
2.7.4
More information about the ffmpeg-devel
mailing list