lavfi: skip the frame in case of error.

This fixes playback with some audio files through filters.
This commit is contained in:
Clément Bœsch 2011-12-13 15:54:59 +01:00 committed by Clément Bœsch
parent f39258d587
commit 220481e1d6
1 changed files with 3 additions and 1 deletions

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;