History

avcodec/mpeg12dec: Don't assert on thread_count

Nothing in this decoder would break if the generic code were to be changed to allow slice "threading" with only one thread.

Andreas Rheinhardt committed 1 year ago

Commit 3ad00eb1 parent 2742de01 file · +0 −2Browse files

Unified · Split

libavcodec/mpeg12dec.c+0−2
@@ -2240,7 +2240,6 @@ static void mpeg12_execute_slice_threads(AVCodecContext *avctx, · 2239 unmodified lines
22402240 !avctx->hwaccel) {
22412241 MpegEncContext *const s2 = &s->mpeg_enc_ctx;
22422242 int error_count = 0;
2243− av_assert0(avctx->thread_count > 1);
22442243
22452244 avctx->execute(avctx, slice_decode_thread,
22462245 s2->thread_context, NULL,
@@ -2538,7 +2537,6 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 291 unmodified lines
25382537 int threshold = (s2->mb_height * s->slice_count +
25392538 s2->slice_context_count / 2) /
25402539 s2->slice_context_count;
2541− av_assert0(avctx->thread_count > 1);
25422540 if (threshold <= mb_y) {
25432541 MpegEncContext *thread_context = s2->thread_context[s->slice_count];
25442542

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