discard corrupted track and good track have chance to play.

Signed-off-by: tiejun.peng <tiejun.p...@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



_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to