You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -2240,7 +2240,6 @@ static void mpeg12_execute_slice_threads(AVCodecContext *avctx,
|
|||||||
!avctx->hwaccel) {
|
!avctx->hwaccel) {
|
||||||
MpegEncContext *const s2 = &s->mpeg_enc_ctx;
|
MpegEncContext *const s2 = &s->mpeg_enc_ctx;
|
||||||
int error_count = 0;
|
int error_count = 0;
|
||||||
av_assert0(avctx->thread_count > 1);
|
|
||||||
|
|
||||||
avctx->execute(avctx, slice_decode_thread,
|
avctx->execute(avctx, slice_decode_thread,
|
||||||
s2->thread_context, NULL,
|
s2->thread_context, NULL,
|
||||||
@ -2538,7 +2537,6 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
|
|||||||
int threshold = (s2->mb_height * s->slice_count +
|
int threshold = (s2->mb_height * s->slice_count +
|
||||||
s2->slice_context_count / 2) /
|
s2->slice_context_count / 2) /
|
||||||
s2->slice_context_count;
|
s2->slice_context_count;
|
||||||
av_assert0(avctx->thread_count > 1);
|
|
||||||
if (threshold <= mb_y) {
|
if (threshold <= mb_y) {
|
||||||
MpegEncContext *thread_context = s2->thread_context[s->slice_count];
|
MpegEncContext *thread_context = s2->thread_context[s->slice_count];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user