From c2eae4bae7f5799c0f3cafb0cb189c420782f06c Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Mon, 28 May 2012 21:45:36 +0200 Subject: lavfi: Fill linesize, sample_rate and channel_layout fields in avfilter_fill_frame_from_audio_buffer_ref. Signed-off-by: Michael Niedermayer --- libavfilter/avcodec.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libavfilter') diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c index 0ccdc5c0cb..3f79c20dff 100644 --- a/libavfilter/avcodec.c +++ b/libavfilter/avcodec.c @@ -59,10 +59,13 @@ int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame, return AVERROR(EINVAL); memcpy(frame->data, samplesref->data, sizeof(frame->data)); - frame->pkt_pos = samplesref->pos; - frame->format = samplesref->format; - frame->nb_samples = samplesref->audio->nb_samples; - frame->pts = samplesref->pts; + memcpy(frame->linesize, samplesref->linesize, sizeof(frame->linesize)); + frame->pkt_pos = samplesref->pos; + frame->format = samplesref->format; + frame->nb_samples = samplesref->audio->nb_samples; + frame->pts = samplesref->pts; + frame->sample_rate = samplesref->audio->sample_rate; + frame->channel_layout = samplesref->audio->channel_layout; return 0; } -- cgit v1.2.3