History

avcodec/hw_base_encode: Simplify EOF check

Found while reviewing CID1608712 Explicit null dereferenced

Michael Niedermayer committed 2 years ago

Commit 1e888fb1 parent b2aaeb81 file · +3 −4Browse files

Unified · Split

libavcodec/hw_base_encode.c+3−4
@@ -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)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t