lavfi: Fill linesize, sample_rate and channel_layout fields in avfilter_fill_frame_fr...
authorRobert Nagy <ronag89@gmail.com>
Mon, 28 May 2012 19:45:36 +0000 (21:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 28 May 2012 20:52:23 +0000 (22:52 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/avcodec.c

index 0ccdc5c..3f79c20 100644 (file)
@@ -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;
 }