You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
lavc/hevcdec: always call hevc_frame_end() after successfully decoding an AU
Currently it is only done if the final CTB address is at the end of the
frame, however that address is not known with hwaccel decoding. As we
only support exactly one AU per packet, and not partial/multiple AUs, we
can just as well call hevc_frame_end() unconditionally.
Fixes hwaccel decoding after d725c737fe
.
Reported-by: llyyr <llyyr.public@gmail.com>
This commit is contained in:
@ -3192,11 +3192,6 @@ static int decode_slice(HEVCContext *s, const H2645NAL *nal, GetBitContext *gb)
|
|||||||
ret = decode_slice_data(s, nal, gb);
|
ret = decode_slice_data(s, nal, gb);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if (ret >= s->cur_frame->ctb_count) {
|
|
||||||
ret = hevc_frame_end(s);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -3370,8 +3365,13 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (s->cur_frame && s->avctx->active_thread_type == FF_THREAD_FRAME)
|
if (s->cur_frame) {
|
||||||
ff_progress_frame_report(&s->cur_frame->tf, INT_MAX);
|
if (ret >= 0)
|
||||||
|
ret = hevc_frame_end(s);
|
||||||
|
|
||||||
|
if (s->avctx->active_thread_type == FF_THREAD_FRAME)
|
||||||
|
ff_progress_frame_report(&s->cur_frame->tf, INT_MAX);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user