[FFmpeg-cvslog] buffersrc: use avfilter_get_buffer_ref_from_frame.
Nicolas George
git at videolan.org
Mon Jul 23 17:31:22 CEST 2012
ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sat Jul 21 00:48:23 2012 +0200| [05776119c1b4da3a699ec1b3d5439687afed24af] | committer: Nicolas George
buffersrc: use avfilter_get_buffer_ref_from_frame.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05776119c1b4da3a699ec1b3d5439687afed24af
---
libavfilter/buffersrc.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 5186b09..153ab6c 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);
More information about the ffmpeg-cvslog
mailing list