Commit 000836c2 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_asetnsamples: add missing error check

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent bea8eeaa
......@@ -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;
......
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