Fix CID 1416960.
Showing the changes to libavfilter/framesync.c (1 of 1 file). Show all
Unified · Split
| @@ -380,15 +380,13 @@ int ff_framesync_dualinput_get(FFFrameSync *fs, AVFrame **f0, AVFrame **f1) · 379 unmodified lines | |||
| 380 | { | 380 | { |
| 381 | AVFilterContext *ctx = fs->parent; | 381 | AVFilterContext *ctx = fs->parent; |
| 382 | AVFrame *mainpic = NULL, *secondpic = NULL; | 382 | AVFrame *mainpic = NULL, *secondpic = NULL; |
| 383 | int ret = 0; | 383 | int ret; |
| 384 | 384 | ||
| 385 | if ((ret = ff_framesync_get_frame(fs, 0, &mainpic, 1)) < 0 || | 385 | if ((ret = ff_framesync_get_frame(fs, 0, &mainpic, 1)) < 0 || |
| 386 | (ret = ff_framesync_get_frame(fs, 1, &secondpic, 0)) < 0) { | 386 | (ret = ff_framesync_get_frame(fs, 1, &secondpic, 0)) < 0) { |
| 387 | av_frame_free(&mainpic); | 387 | av_frame_free(&mainpic); |
| 388 | return ret; | 388 | return ret; |
| 389 | } | 389 | } |
| 390 | if (ret < 0) | ||
| 391 | return ret; | ||
| 392 | av_assert0(mainpic); | 390 | av_assert0(mainpic); |
| 393 | mainpic->pts = av_rescale_q(fs->pts, fs->time_base, ctx->outputs[0]->time_base); | 391 | mainpic->pts = av_rescale_q(fs->pts, fs->time_base, ctx->outputs[0]->time_base); |
| 394 | if (ctx->is_disabled) | 392 | if (ctx->is_disabled) |