int nb_samples = buf->nb_samples;
AVFrame *out_buf;
int64_t pos;
+ int ret;
if (isnan(vol->var_values[VAR_STARTPTS])) {
vol->var_values[VAR_STARTPTS] = TS2D(buf->pts);
out_buf = ff_get_audio_buffer(inlink, nb_samples);
if (!out_buf)
return AVERROR(ENOMEM);
- av_frame_copy_props(out_buf, buf);
+ ret = av_frame_copy_props(out_buf, buf);
+ if (ret < 0) {
+ av_frame_free(&out_buf);
+ av_frame_free(&buf);
+ return ret;
+ }
}
if (vol->precision != PRECISION_FIXED || vol->volume_i > 0) {