summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 38a3e6f3c6..6227efd51f 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2342,6 +2342,7 @@ static int decode_chunks(AVCodecContext *avctx,
if(s2->pict_type != AV_PICTURE_TYPE_B || avctx->skip_frame <= AVDISCARD_DEFAULT){
if(HAVE_THREADS && avctx->active_thread_type&FF_THREAD_SLICE){
int i;
+ assert(avctx->thread_count > 1);
avctx->execute(avctx, slice_decode_thread, &s2->thread_context[0], NULL, s->slice_count, sizeof(void*));
for(i=0; i<s->slice_count; i++)
@@ -2510,6 +2511,7 @@ static int decode_chunks(AVCodecContext *avctx,
if(HAVE_THREADS && avctx->active_thread_type&FF_THREAD_SLICE){
int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count;
+ assert(avctx->thread_count > 1);
if(threshold <= mb_y){
MpegEncContext *thread_context= s2->thread_context[s->slice_count];