lavc: copy AVCodecContext for threads