[FFmpeg-cvslog] vsrc_buffer: propagate error code in av_vsrc_buffer_add_frame()
Stefano Sabatini
git at videolan.org
Thu Jun 2 18:55:17 CEST 2011
ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Thu Jun 2 16:09:24 2011 +0200| [9e66b64c360568a91faa84d0cda96ab93c467502] | committer: Stefano Sabatini
vsrc_buffer: propagate error code in av_vsrc_buffer_add_frame()
Propagate av_vsrc_buffer_add_video_buffer_ref() error code rather than
return 0.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e66b64c360568a91faa84d0cda96ab93c467502
---
libavfilter/vsrc_buffer.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c
index d1e6ffd..9ba7d4e 100644
--- a/libavfilter/vsrc_buffer.c
+++ b/libavfilter/vsrc_buffer.c
@@ -111,15 +111,16 @@ int av_vsrc_buffer_add_video_buffer_ref(AVFilterContext *buffer_filter, AVFilter
int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src, const AVFrame *frame)
{
+ int ret;
AVFilterBufferRef *picref =
avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE);
if (!picref)
return AVERROR(ENOMEM);
- av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref);
+ ret = av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref);
picref->buf->data[0] = NULL;
avfilter_unref_buffer(picref);
- return 0;
+ return ret;
}
#endif
More information about the ffmpeg-cvslog
mailing list