Skip to content
Snippets Groups Projects
Commit d3e4d406 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

h264dec: reset nb_slice_ctx_queued for hwaccel decoding


Fixes hwaccel decoding of files with multiple slices.

Found-By: default avatarMark Thompson <sw@jkqxz.net>
parent e5b01972
No related branches found
No related tags found
No related merge requests found
...@@ -564,9 +564,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size) ...@@ -564,9 +564,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
max_slice_ctx = avctx->hwaccel ? 1 : h->nb_slice_ctx; max_slice_ctx = avctx->hwaccel ? 1 : h->nb_slice_ctx;
if (h->nb_slice_ctx_queued == max_slice_ctx) { if (h->nb_slice_ctx_queued == max_slice_ctx) {
if (avctx->hwaccel) if (avctx->hwaccel) {
ret = avctx->hwaccel->decode_slice(avctx, nal->raw_data, nal->raw_size); ret = avctx->hwaccel->decode_slice(avctx, nal->raw_data, nal->raw_size);
else h->nb_slice_ctx_queued = 0;
} else
ret = ff_h264_execute_decode_slices(h); ret = ff_h264_execute_decode_slices(h);
if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE)) if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
goto end; goto end;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment