diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-05-07 21:35:08 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-05-19 23:15:33 +0200 |
commit | 6070b7e1c520e9ca389403bae20a2ad04c7d54c7 (patch) | |
tree | 4d78a27c7053a106680831caaef01ad70c1b1d2e /ffmpeg.c | |
parent | 3c7650a83d3bdca2fd680af722de344b092f65ec (diff) |
vsrc_buffer: remove dependency on AVFrame
Rename av_vsrc_buffer_add_frame to
av_vsrc_buffer_add_video_buffer_ref(), and change its inteface to make
it accept in input an AVFilterBufferRef rather than an AVFrame.
This way the interface can be used without requiring the
inclusion/installation of libavcodec headers.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1643,13 +1643,20 @@ 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; - // add it to be filtered - av_vsrc_buffer_add_frame2(ost->input_video_filter, &picture, ""); //TODO user setable params + + picref = avfilter_get_video_buffer_ref_from_arrays( + picture.data, picture.linesize, AV_PERM_WRITE, + picture.width, picture.height, picture.format); + avfilter_copy_frame_props(picref, &picture); + av_vsrc_buffer_add_video_buffer_ref2(ost->input_video_filter, picref, ""); //TODO user setable params + picref->buf->data[0] = NULL; + avfilter_unref_buffer(picref); } } } |