lavfi: skip the frame in case of error.
This fixes playback with some audio files through filters.
This commit is contained in:

committed by
Clément Bœsch

parent
f39258d587
commit
220481e1d6
@@ -416,8 +416,10 @@ static int amovie_get_samples(AVFilterLink *outlink)
|
|||||||
/* decode and update the movie pkt */
|
/* decode and update the movie pkt */
|
||||||
ret = avcodec_decode_audio3(movie->codec_ctx, movie->samples_buf,
|
ret = avcodec_decode_audio3(movie->codec_ctx, movie->samples_buf,
|
||||||
&decoded_data_size, &movie->pkt);
|
&decoded_data_size, &movie->pkt);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
movie->pkt.size = 0;
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
movie->pkt.data += ret;
|
movie->pkt.data += ret;
|
||||||
movie->pkt.size -= ret;
|
movie->pkt.size -= ret;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user