Propagate av_vsrc_buffer_add_video_buffer_ref() error code rather than return 0.
Showing the changes to libavfilter/vsrc_buffer.c (1 of 1 file). Show all
Unified · Split
| @@ -111,15 +111,16 @@ int av_vsrc_buffer_add_video_buffer_ref(AVFilterContext *buffer_filter, AVFilter · 110 unmodified lines | ||
| 111 | 111 | |
| 112 | 112 | int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src, const AVFrame *frame) |
| 113 | 113 | { |
| 114 | + int ret; | |
| 114 | 115 | AVFilterBufferRef *picref = |
| 115 | 116 | avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE); |
| 116 | 117 | if (!picref) |
| 117 | 118 | return AVERROR(ENOMEM); |
| 118 | − av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref); | |
| 119 | + ret = av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref); | |
| 119 | 120 | picref->buf->data[0] = NULL; |
| 120 | 121 | avfilter_unref_buffer(picref); |
| 121 | 122 | |
| 122 | − return 0; | |
| 123 | + return ret; | |
| 123 | 124 | } |
| 124 | 125 | #endif |
| 125 | 126 | |