libavformat: Use avcodec_copy_context for chained muxers