mpegenc: use avctx->slices as number of slices

Adds a new member to MpegEncContext to hold the number of used slice
contexts. Fixes segfaults with '-threads 17 -thread_type slice' and
fate-vsynth{1,2}-mpeg{2,4}thread{,_ilace} with --disable-pthreads.
This commit is contained in:
Janne Grunau
2012-01-01 20:24:24 +01:00
parent 264808219d
commit 881a5e047d
7 changed files with 43 additions and 37 deletions

View File

@@ -268,6 +268,7 @@ typedef struct MpegEncContext {
int start_mb_y; ///< start mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
int end_mb_y; ///< end mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
struct MpegEncContext *thread_context[MAX_THREADS];
int slice_context_count; ///< number of used thread_contexts
/**
* copy of the previous picture structure.