From 220481e1d6582277ae4c02b05f87251a8670e6cc Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Tue, 13 Dec 2011 15:54:59 +0100 Subject: lavfi: skip the frame in case of error. This fixes playback with some audio files through filters. --- libavfilter/src_movie.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavfilter/src_movie.c') diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 2017e30732..367688a40b 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; -- cgit v1.2.3