copy pts and format props between lavfi buffer and frame.
authorRobert Nagy <ronag89@gmail.com>
Sat, 14 Apr 2012 10:09:46 +0000 (12:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Apr 2012 14:07:23 +0000 (16:07 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/avcodec.c

index e4cae9b..3581aef 100644 (file)
@@ -66,6 +66,7 @@ int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
     frame->pkt_pos    = samplesref->pos;
     frame->format     = samplesref->format;
     frame->nb_samples = samplesref->audio->nb_samples;
     frame->pkt_pos    = samplesref->pos;
     frame->format     = samplesref->format;
     frame->nb_samples = samplesref->audio->nb_samples;
+    frame->pts        = samplesref->pts;
 
     return 0;
 }
 
     return 0;
 }
@@ -86,6 +87,8 @@ int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
     frame->sample_aspect_ratio = picref->video->sample_aspect_ratio;
     frame->width            = picref->video->w;
     frame->height           = picref->video->h;
     frame->sample_aspect_ratio = picref->video->sample_aspect_ratio;
     frame->width            = picref->video->w;
     frame->height           = picref->video->h;
+    frame->format           = picref->format;
+    frame->pts              = picref->pts;
 
     return 0;
 }
 
     return 0;
 }