1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi/anullsrc: add missing checks

This commit is contained in:
Stefano Sabatini 2013-03-22 01:43:43 +01:00
parent 4e8062c2d7
commit a42d15a3a0

View File

@ -114,12 +114,17 @@ static int request_frame(AVFilterLink *outlink)
AVFrame *samplesref;
samplesref = ff_get_audio_buffer(outlink, null->nb_samples);
if (!samplesref)
return AVERROR(ENOMEM);
samplesref->pts = null->pts;
samplesref->channel_layout = null->channel_layout;
samplesref->sample_rate = outlink->sample_rate;
ret = ff_filter_frame(outlink, av_frame_clone(samplesref));
av_frame_free(&samplesref);
if (ret < 0)
return ret;
null->pts += null->nb_samples;
return ret;