[FFmpeg-cvslog] lavfi: Fill linesize, sample_rate and channel_layout fields in avfilter_fill_frame_from_audio_buffer_ref .
Robert Nagy
git at videolan.org
Thu Jun 7 01:44:14 CEST 2012
ffmpeg | branch: release/0.11 | Robert Nagy <ronag89 at gmail.com> | Mon May 28 21:45:36 2012 +0200| [0e2b69b4e618733e322b4c0c039eeee5150c4504] | committer: Michael Niedermayer
lavfi: Fill linesize, sample_rate and channel_layout fields in avfilter_fill_frame_from_audio_buffer_ref.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit c2eae4bae7f5799c0f3cafb0cb189c420782f06c)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e2b69b4e618733e322b4c0c039eeee5150c4504
---
libavfilter/avcodec.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index 0ccdc5c..3f79c20 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;
}
More information about the ffmpeg-cvslog
mailing list