mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
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.
This commit is contained in:
parent
665e608c8d
commit
9e66b64c36
@ -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 av_vsrc_buffer_add_frame(AVFilterContext *buffer_src, const AVFrame *frame)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
AVFilterBufferRef *picref =
|
AVFilterBufferRef *picref =
|
||||||
avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE);
|
avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE);
|
||||||
if (!picref)
|
if (!picref)
|
||||||
return AVERROR(ENOMEM);
|
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;
|
picref->buf->data[0] = NULL;
|
||||||
avfilter_unref_buffer(picref);
|
avfilter_unref_buffer(picref);
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user