OSDN Git Service

ffmpeg: do not report EOF as an error.
authorNicolas George <nicolas.george@normalesup.org>
Tue, 24 Apr 2012 08:52:55 +0000 (10:52 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Tue, 24 Apr 2012 13:46:03 +0000 (15:46 +0200)
Not all processing goes through filters,
so processing can continue even when
all filtergraphs have reached EOF on all sinks.

ffmpeg.c

index d1ed3c6..069ada8 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3621,7 +3621,8 @@ static int transcode(void)
         }
 
         // fprintf(stderr,"read #%d.%d size=%d\n", ist->file_index, ist->st->index, pkt.size);
-        if (output_packet(ist, &pkt) < 0 || poll_filters() < 0) {
+        if (output_packet(ist, &pkt) < 0 ||
+            ((ret = poll_filters()) < 0 && ret != AVERROR_EOF)) {
             av_log(NULL, AV_LOG_ERROR, "Error while decoding stream #%d:%d\n",
                    ist->file_index, ist->st->index);
             if (exit_on_error)