lavfi: skip the frame in case of error.

This fixes playback with some audio files through filters.
(cherry picked from commit 220481e1d6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Clément Bœsch
2011-12-13 15:54:59 +01:00
committed by Michael Niedermayer
parent 834aef341d
commit 9aaf250fb3
+3 -1
View File
@@ -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;