mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/af_asetnsamples: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
bea8eeaa2c
commit
000836c2a9
|
@ -140,11 +140,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
av_audio_fifo_write(asns->fifo, (void **)insamples->extended_data, nb_samples);
|
||||
if (asns->next_out_pts == AV_NOPTS_VALUE)
|
||||
ret = av_audio_fifo_write(asns->fifo, (void **)insamples->extended_data, nb_samples);
|
||||
if (ret > 0 && asns->next_out_pts == AV_NOPTS_VALUE)
|
||||
asns->next_out_pts = insamples->pts;
|
||||
av_frame_free(&insamples);
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
while (av_audio_fifo_size(asns->fifo) >= asns->nb_out_samples)
|
||||
push_samples(outlink);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue