avcodec/mpegvideo: Use av_memdup() for allocating thread_context