Commit 220481e1 authored by Clément Bœsch's avatar Clément Bœsch Committed by Clément Bœsch

lavfi: skip the frame in case of error.

This fixes playback with some audio files through filters.
parent f39258d5
...@@ -416,8 +416,10 @@ static int amovie_get_samples(AVFilterLink *outlink) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment