aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vsrc_buffer.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-01 14:47:05 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-07 12:03:49 +0200
commit566666caf3a09d6254edaa99d222eddb6fe2986b (patch)
tree7570c9596cfde912b168846aa5a303d828d56089 /libavfilter/vsrc_buffer.c
parent18ded93ab3db5996cd86fe2f5b36ba3c4bd58711 (diff)
downloadffmpeg-566666caf3a09d6254edaa99d222eddb6fe2986b.tar.gz
lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props()
avfilter_copy_frame_props() avoids code duplication and increases robustness. The added files libavfilter/avcodec.[ch] are used for containing utilities useful for gluing togheter libavfilter and libavcodec.
Diffstat (limited to 'libavfilter/vsrc_buffer.c')
-rw-r--r--libavfilter/vsrc_buffer.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c
index b094e99209..b78d979711 100644
--- a/libavfilter/vsrc_buffer.c
+++ b/libavfilter/vsrc_buffer.c
@@ -24,6 +24,7 @@
*/
#include "avfilter.h"
+#include "avcodec.h"
#include "vsrc_buffer.h"
#include "libavutil/imgutils.h"
@@ -193,13 +194,9 @@ static int request_frame(AVFilterLink *link)
av_image_copy(picref->data, picref->linesize,
c->frame.data, c->frame.linesize,
picref->format, link->w, link->h);
+ avfilter_copy_frame_props(picref, &c->frame);
+ picref->pts = c->pts;
- picref->pts = c->pts;
- picref->video->sample_aspect_ratio = c->frame.sample_aspect_ratio;
- picref->video->interlaced = c->frame.interlaced_frame;
- picref->video->top_field_first = c->frame.top_field_first;
- picref->video->key_frame = c->frame.key_frame;
- picref->video->pict_type = c->frame.pict_type;
avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0));
avfilter_draw_slice(link, 0, link->h, 1);
avfilter_end_frame(link);