summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-19 01:17:16 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-19 23:15:34 +0200
commitc000a9f78390b71812c7ee5187bbccc3c2d79b1e (patch)
tree101bafe8874835096c6dd536ec38a968a9174013 /ffmpeg.c
parentd3fddb8454cab525cbcb6cc9c3d0ca29b6c78cdd (diff)
vsrc_buffer: add av_vsrc_buffer_add_frame()
The new function is a wrapper around av_vsrc_buffer_add_video_buffer_ref(), and allows to simplify the act of pushing AVFrame data to the source buffer.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 182f92945b..2b19c7f21b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1643,18 +1643,13 @@ static int output_packet(AVInputStream *ist, int ist_index,
#if CONFIG_AVFILTER
if(ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
for(i=0;i<nb_ostreams;i++) {
- AVFilterBufferRef *picref;
ost = ost_table[i];
if (ost->input_video_filter && ost->source_index == ist_index) {
if (!picture.sample_aspect_ratio.num)
picture.sample_aspect_ratio = ist->st->sample_aspect_ratio;
picture.pts = ist->pts;
- picref =
- avfilter_get_video_buffer_ref_from_frame(&picture, AV_PERM_WRITE);
- av_vsrc_buffer_add_video_buffer_ref(ost->input_video_filter, picref);
- picref->buf->data[0] = NULL;
- avfilter_unref_buffer(picref);
+ av_vsrc_buffer_add_frame(ost->input_video_filter, &picture);
}
}
}