Found while reviewing CID1608712 Explicit null dereferenced
Unified · Split
| @@ -546,11 +546,10 @@ start: · 545 unmodified lines | |||
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | err = ff_encode_get_frame(avctx, frame); | 548 | err = ff_encode_get_frame(avctx, frame); |
| 549 | if (err < 0 && err != AVERROR_EOF) | 549 | if (err == AVERROR_EOF) { |
| 550 | return err; | ||
| 551 | |||
| 552 | if (err == AVERROR_EOF) | ||
| 553 | frame = NULL; | 550 | frame = NULL; |
| 551 | } else if (err < 0) | ||
| 552 | return err; | ||
| 554 | 553 | ||
| 555 | err = hw_base_encode_send_frame(avctx, ctx, frame); | 554 | err = hw_base_encode_send_frame(avctx, ctx, frame); |
| 556 | if (err < 0) | 555 | if (err < 0) |