diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-07-21 00:48:23 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-07-23 17:14:59 +0200 |
commit | 05776119c1b4da3a699ec1b3d5439687afed24af (patch) | |
tree | 6746cbb37051f1a5a119a2a43eb2f1d44cdf6f6c /libavfilter | |
parent | 5c5f75b92bed707738a2ea6efa0d3b5c003616b6 (diff) | |
download | ffmpeg-05776119c1b4da3a699ec1b3d5439687afed24af.tar.gz |
buffersrc: use avfilter_get_buffer_ref_from_frame.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/buffersrc.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 5186b0920b..153ab6c0f7 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -83,16 +83,8 @@ int av_buffersrc_add_frame(AVFilterContext *buffer_src, if (!frame) /* NULL for EOF */ return av_buffersrc_add_ref(buffer_src, NULL, flags); - switch (buffer_src->outputs[0]->type) { - case AVMEDIA_TYPE_VIDEO: - picref = avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE); - break; - case AVMEDIA_TYPE_AUDIO: - picref = avfilter_get_audio_buffer_ref_from_frame(frame, AV_PERM_WRITE); - break; - default: - return AVERROR(ENOSYS); - } + picref = avfilter_get_buffer_ref_from_frame(buffer_src->outputs[0]->type, + frame, AV_PERM_WRITE); if (!picref) return AVERROR(ENOMEM); ret = av_buffersrc_add_ref(buffer_src, picref, flags); |