Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Nagy <ronag89@gmail.com>2012-05-28 23:45:36 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-05-29 00:52:23 +0400
commitc2eae4bae7f5799c0f3cafb0cb189c420782f06c (patch)
tree28dfb1eb38b923a31a949ae43d56be46287916c4 /libavfilter
parentd187e7616e32353e31c046cd095b19c96073bcad (diff)
lavfi: Fill linesize, sample_rate and channel_layout fields in avfilter_fill_frame_from_audio_buffer_ref.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avcodec.c11
1 files changed, 7 insertions, 4 deletions
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;
}