Fixes: CID1458043 Unchecked return value
Unified · Split
| @@ -2288,8 +2288,11 @@ static int xfade_activate(AVFilterContext *avctx) · 2287 unmodified lines | |||
| 2288 | // Check if we are not yet transitioning, in which case | 2288 | // Check if we are not yet transitioning, in which case |
| 2289 | // just request and forward the input frame. | 2289 | // just request and forward the input frame. |
| 2290 | if (s->start_pts > s->pts) { | 2290 | if (s->start_pts > s->pts) { |
| 2291 | int ret; | ||
| 2291 | s->passthrough = 1; | 2292 | s->passthrough = 1; |
| 2292 | ff_inlink_consume_frame(in_a, &s->xf[0]); | 2293 | ret = ff_inlink_consume_frame(in_a, &s->xf[0]); |
| 2294 | if (ret < 0) | ||
| 2295 | return ret; | ||
| 2293 | return ff_filter_frame(outlink, s->xf[0]); | 2296 | return ff_filter_frame(outlink, s->xf[0]); |
| 2294 | } | 2297 | } |
| 2295 | s->passthrough = 0; | 2298 | s->passthrough = 0; |
| @@ -2297,8 +2300,14 @@ static int xfade_activate(AVFilterContext *avctx) · 1 unmodified line | |||
| 2297 | // We are transitioning, so we need a frame from second input | 2300 | // We are transitioning, so we need a frame from second input |
| 2298 | if (ff_inlink_check_available_frame(in_b)) { | 2301 | if (ff_inlink_check_available_frame(in_b)) { |
| 2299 | int ret; | 2302 | int ret; |
| 2300 | ff_inlink_consume_frame(avctx->inputs[0], &s->xf[0]); | 2303 | ret = ff_inlink_consume_frame(avctx->inputs[0], &s->xf[0]); |
| 2301 | ff_inlink_consume_frame(avctx->inputs[1], &s->xf[1]); | 2304 | if (ret < 0) |
| 2305 | return ret; | ||
| 2306 | ret = ff_inlink_consume_frame(avctx->inputs[1], &s->xf[1]); | ||
| 2307 | if (ret < 0) { | ||
| 2308 | av_frame_free(&s->xf[0]); | ||
| 2309 | return ret; | ||
| 2310 | } | ||
| 2302 | 2311 | ||
| 2303 | // Calculate PTS offset to first input | 2312 | // Calculate PTS offset to first input |
| 2304 | if (s->inputs_offset_pts == AV_NOPTS_VALUE) | 2313 | if (s->inputs_offset_pts == AV_NOPTS_VALUE) |