i was trying to understand the level of parallelization implemented in ffmpeg libavcodec decoding h264 coded video files. i see decoding happening parallelly at frame level and slice level, with the number of threads limited to (number of cores + 1). but i could not figure out how they decide which level of parallelization to use for any video file. i find that the decision is taken based on the value of codeccontext->active_thread_type. but where is this parameter set ? please let me know if anyone is aware of this.