[FFmpeg-cvslog] lavfi: skip the frame in case of error.

Clément Bœsch git at videolan.org
Tue Dec 13 20:26:22 CET 2011


ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Tue Dec 13 15:54:59 2011 +0100| [220481e1d6582277ae4c02b05f87251a8670e6cc] | committer: Clément Bœsch

lavfi: skip the frame in case of error.

This fixes playback with some audio files through filters.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=220481e1d6582277ae4c02b05f87251a8670e6cc
---

 libavfilter/src_movie.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c
index 2017e30..367688a 100644
--- a/libavfilter/src_movie.c
+++ b/libavfilter/src_movie.c
@@ -416,8 +416,10 @@ static int amovie_get_samples(AVFilterLink *outlink)
     /* decode and update the movie pkt */
     ret = avcodec_decode_audio3(movie->codec_ctx, movie->samples_buf,
                                 &decoded_data_size, &movie->pkt);
-    if (ret < 0)
+    if (ret < 0) {
+        movie->pkt.size = 0;
         return ret;
+    }
     movie->pkt.data += ret;
     movie->pkt.size -= ret;
 



More information about the ffmpeg-cvslog mailing list