Message ID | GV1P250MB073786B9129961BEACCD69A18F0BA@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel,1/5] avcodec/nvdec_(mjpeg|vp8): Constify AVHWAccels | expand |
Context | Check | Description |
---|---|---|
yinshiyou/commit_msg_loongarch64 | warning | The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ". |
andriy/commit_msg_x86 | warning | The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ". |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 2aa6f1d864..68e20925e0 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -804,7 +804,7 @@ void ff_er_frame_start(ERContext *s) static int er_supported(ERContext *s) { - if(s->avctx->hwaccel && s->avctx->hwaccel->decode_slice || + if (s->avctx->hwaccel || !s->cur_pic.f || s->cur_pic.field_picture ) @@ -828,7 +828,7 @@ void ff_er_add_slice(ERContext *s, int startx, int starty, const int end_xy = s->mb_index2xy[end_i]; int mask = -1; - if (s->avctx->hwaccel && s->avctx->hwaccel->decode_slice) + if (s->avctx->hwaccel) return; if (start_i > end_i || start_xy > end_xy) { diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 27b45c6fc4..3737d77eca 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1750,7 +1750,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, return AVERROR_INVALIDDATA; } - if (avctx->hwaccel && avctx->hwaccel->decode_slice) { + if (avctx->hwaccel) { const uint8_t *buf_end, *buf_start = *buf - 4; /* include start_code */ int start_code = -1; buf_end = avpriv_find_start_code(buf_start + 2, *buf + buf_size, &start_code);
Having a decode_slice callback is mandatory for HWAccels; the only exception to this (and the reason why these checks were added) was XvMC, but it is no more since commit be95df12bb06b183c8d2aea3b0831fdf05466cf3. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/error_resilience.c | 4 ++-- libavcodec/mpeg12dec.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)