History

lavc/hevcdec: do not unref current frame on frame_end() failure

It's a race with frame threading.

Anton Khirnov committed 2 years ago

Commit ccd391d1 parent d725c731 file · +1 −4Browse files

Unified · Split

libavcodec/hevc/hevcdec.c+1−4
@@ -3135,17 +3135,14 @@ static int hevc_frame_end(HEVCContext *s) · 3134 unmodified lines
31353135 if (ret < 0) {
31363136 av_log(s->avctx, AV_LOG_ERROR,
31373137 "hardware accelerator failed to decode picture\n");
3138− ff_hevc_unref_frame(s->cur_frame, ~0);
31393138 return ret;
31403139 }
31413140 } else {
31423141 if (s->avctx->err_recognition & AV_EF_CRCCHECK &&
31433142 s->sei.picture_hash.is_md5) {
31443143 ret = verify_md5(s, s->cur_frame->f);
3145− if (ret < 0 && s->avctx->err_recognition & AV_EF_EXPLODE) {
3146− ff_hevc_unref_frame(s->cur_frame, ~0);
3144+ if (ret < 0 && s->avctx->err_recognition & AV_EF_EXPLODE)
31473145 return ret;
3148− }
31493146 }
31503147 }
31513148 s->sei.picture_hash.is_md5 = 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