Hi,

I'm not sure what the purpose of this avio_seek was, but it can result in an endless loop. Maybe it always does.

Best regards,
Andreas
>From e69589b1435b4d3e7a0a4de6158149f11a99a681 Mon Sep 17 00:00:00 2001
From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
Date: Sun, 8 Mar 2015 23:39:23 +0100
Subject: [PATCH 8/8] ffmdec: don't seek back at EOF

Doing so can cause the ffm demuxer to return the same packets endlessly.

Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
---
 libavformat/ffmdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 9f00fc4..97849f8 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -91,7 +91,7 @@ static int ffm_read_data(AVFormatContext *s,
             len = size;
         if (len == 0) {
             if (avio_tell(pb) == ffm->file_size)
-                avio_seek(pb, ffm->packet_size, SEEK_SET);
+                return AVERROR_EOF;
     retry_read:
             if (pb->buffer_size != ffm->packet_size) {
                 int64_t tell = avio_tell(pb);
-- 
2.1.4

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

Reply via email to