Nothing in this decoder would break if the generic code were to be changed to allow slice "threading" with only one thread.
Unified · Split
| @@ -2240,7 +2240,6 @@ static void mpeg12_execute_slice_threads(AVCodecContext *avctx, · 2239 unmodified lines | ||
| 2240 | 2240 | !avctx->hwaccel) { |
| 2241 | 2241 | MpegEncContext *const s2 = &s->mpeg_enc_ctx; |
| 2242 | 2242 | int error_count = 0; |
| 2243 | − av_assert0(avctx->thread_count > 1); | |
| 2244 | 2243 | |
| 2245 | 2244 | avctx->execute(avctx, slice_decode_thread, |
| 2246 | 2245 | s2->thread_context, NULL, |
| @@ -2538,7 +2537,6 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 291 unmodified lines | ||
| 2538 | 2537 | int threshold = (s2->mb_height * s->slice_count + |
| 2539 | 2538 | s2->slice_context_count / 2) / |
| 2540 | 2539 | s2->slice_context_count; |
| 2541 | − av_assert0(avctx->thread_count > 1); | |
| 2542 | 2540 | if (threshold <= mb_y) { |
| 2543 | 2541 | MpegEncContext *thread_context = s2->thread_context[s->slice_count]; |
| 2544 | 2542 | |